fivebeans
fivebeans copied to clipboard
Handlers issues
Hello everyone, this is not really an issue, but I'm having some troubles with the handlers.
I have one worker and two handlers doing completely different tasks.
I want to use Scribe-js to log what my worker are doing.
If I 'require' Scribe-js where my worker is, it will not be available in the handlers.
If I 'require' Scribe-js in both handlers I got an error because it looks like it's two separate instances of Scribe-js trying to write on the same files (did not work when I configure two different paths for the logs either).
Why I can't use a variable in my handler that has been declared where I instanciate my worker ?
Thank you for any help.
See example : https://gist.github.com/smartpierre/1f73d231a33332a72d0a
I've been helped by a friend, I manage to send parameters to my handlers as I wanted to :
https://gist.github.com/smartpierre/7903ad0b08e8c627c062
I hope it will help anyone that is not familiar with that.
You can close the issue :)