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
No event fired when Job added to Queue with no Worker #122
Comments
thats definitively not intended. However I do not understand how having a worker or not can affect it, could you paste a small test case that reproduces this? |
I don’t really understand either, but I can dig in some and make a little
test. Q: what event is supposed to be issued when a job is placed in the
queue?
|
Ok... well I've done a ton of troubleshooting and this is super weird. So it turns out I only have this problem if there is no worker AND I use the reusable connection pattern from the docs:
So I dug and dug and it seems like a problem with the options. If I set the Redis instance to be the
🤷🏾♀️ |
Side note... from the example, don't the name of the Queue and the name of the Worker need to match? If I name them different things, I don't get the event from the QueueEvents when a new job is added. |
Ok so now.. it seems that the reason it works when the key is set to |
if you are able to write a minimal test case that I can run and demonstrates the issue I can debug it myself. |
so is there an event that is fired when a job is added? |
@andrisi there is an event called "waiting" that is emitted when the job is added to the waiting list. |
Ah, ok. And that is never fired later on I presume. Failed jobs get stalled, but not in the waiting list, right? |
If they are stalled they will go back to the waiting list and emit the "waiting" event again. |
Then perhaps an "added" event would be helpful sometimes later on so clients could act on it without houskeepking. |
Hey guys, could you please try last version, added event was added xd |
Team,
I'm not sure if this is intended behavior or not, but I have a listener on a
QueueEvents
instance and I am trying to execute an event handler when aJob
is added to the associatedQueue
. If there is aWorker
instance assigned to the queue then awaiting
event is fired from theQueueEvents
instance when a newJob
is added. However, with noWorker
assigned, there is no event fired as far as I can tell. I threw the kitchen sink at it and am listening for the following on theQueueEvents
instance:The text was updated successfully, but these errors were encountered: