Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for setting process name #56

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

iuri-gg
Copy link
Contributor

@iuri-gg iuri-gg commented Nov 20, 2023

Describe the changes
Updates process name for main thread with [MidiSmtp] #{ARGV.join(' ')} (main) and for forked threads with [MidiSmtp] #{ARGV.join(' ')} (worker #{idx})

Test case
Steps to check the changes:

  1. Run server without forking
  2. Check process name (ps aux | grep Midi) is [MidiSmtp] .... (main)
  3. Run server with forking
  4. Check process names for main and worker threads

Expected behavior
Thread names should start with [MidiSmtp]

System tested on (please complete the following information):

  • OS: OSX 14.1
  • Ruby: 3.2.2

@@ -50,7 +50,7 @@ def io_waitreadable_sleep
def test_slow_io_waitreadable_sleep
# This test hits IO::WaitReadable exception multiple times
# For that, this test must run longer than 1 second
assert measure_io_waitreadable_sleep > 1
assert_operator measure_io_waitreadable_sleep, :>, 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @iuri-gg,
thanks for posting that.
I have to check all the tests for styleguide puposes.

@TomFreudenberg
Copy link
Member

Hey @iuri-gg

thanks for coming up with this improvement.

It makes sense in any case.

I would prefer to store the "id" of the process inside the context vars as well.

So you can add those information to your own logs as well.

I will check and come-up with more feedback

Cheers
Tom

@iuri-gg
Copy link
Contributor Author

iuri-gg commented Nov 27, 2023

Thanks Tom! Let me know how I can help.

@iuri-gg
Copy link
Contributor Author

iuri-gg commented Apr 10, 2024

Hi Tom. Hope all is well. Just pinging on this issue to see if it can be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants