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

use a variable to store process name prefix #337

Closed
wants to merge 2 commits into from
Closed

use a variable to store process name prefix #337

wants to merge 2 commits into from

Conversation

Hikariii
Copy link

@Hikariii Hikariii commented Apr 11, 2017

This variable removes the magic string, allowing specification through hooks.
In our own environment we run this code beforeFirstFork:

$worker::$processPrefix = sprintf('%s%s-', $worker::$processPrefix, $prefix);

We like to be able to see environment differences in top and ps a because we have different users running different instances on the same server.

@chrisboulton
Copy link
Owner

This is a good change, especially if you have some kind of shared infrastructure with multiple apps. 👍

I think rather than a variable here, it might make sense to have this as a setter method - either keeping it as static, or allow it to dynamically be set on an instantiated worker. My argument for an explicit setter method is it means the underlying implementation in Resque can change and the contract we have for consumers doesn't need to be updated. Would you mind updating your PR with that?

danhunsaker added a commit to resque/php-resque that referenced this pull request Dec 11, 2018
@Hikariii Hikariii closed this Jan 28, 2022
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.

2 participants