fivebeans icon indicating copy to clipboard operation
fivebeans copied to clipboard

Handlers issues

Open smartpierre opened this issue 10 years ago • 2 comments
trafficstars

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.

smartpierre avatar Nov 18 '15 15:11 smartpierre

See example : https://gist.github.com/smartpierre/1f73d231a33332a72d0a

smartpierre avatar Nov 18 '15 15:11 smartpierre

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 :)

smartpierre avatar Nov 20 '15 10:11 smartpierre