Closed Hikariii closed 2 years ago
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?
This variable removes the magic string, allowing specification through hooks. In our own environment we run this code
beforeFirstFork
:We like to be able to see environment differences in
top
andps a
because we have different users running different instances on the same server.