Skip to content

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