[Worker] Propagate code changes for failed worker to retry #2107
Unanswered
andreyluchianic
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Not sure what you mean by propagate changes. If you have changed the code of some workers just remove the old workers and start the new ones. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a fastify server that on request adds Workers that i imported in main.js file as a function - it makes some API requests and stores information into database.
BullMQ runs on virtual machine with pm2, on a first run (1000 jobs) i've had on virtual machine 2 different version of NodeJS (16 and 18) and because of NodeJS 16 i guess jobs where failing with error:
fetch is not defined
that makes sense cause fetch API exists from NodeJS 18. I've removed old version of Node and updated pm2 Daemon to use version 18.Now when i retry jobs some of them are picking up and running OK, but some of them still replying me with same error. I've added debug statements in Worker but changes are NOT propagating for every Worker. For example i've had 300 failed jobs i retried them all smth like 100-120 job went OK with new code and debug info others keep returning same error with same exact stacktrace which should be different if they've run with new code. With each iteration just some part of jobs run with new code.
How can i force BullMQ to propagate code changes for failed job to retry them ?
Beta Was this translation helpful? Give feedback.
All reactions