-
|
Hello, Thanks for the library :) I'm trying to create recuring job which would execute every N days. Looking at the docs I found this: Example code i had in mind is: Would running this on single container start suffice, or is there something more I'm missing? Thanks in advance for help :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi 👋
Unfortunately, your example won't run as it is. To enqueue a Job, you will need to fix 2 things:
Short answer: it depends. In an ideal world, you would set an id to your Job, which will make it unique. This behavior is described here. However, not all brokers are supporting this functionality (e.g. current Redis implementation does support it, but RabbitMQ - doesn't). You can, of course, create your own synchronization primitive on top of it. |
Beta Was this translation helpful? Give feedback.
Hi 👋
Unfortunately, your example won't run as it is. To enqueue a Job, you will need to fix 2 things:
enqueue_delete_stuff_in_dbfunction async, otherwise you won't be able to doawaitShort answer: it depends. In an ideal world, you would set an id to your Job, which will make it unique. This behavior is described here.
However, not all brokers are supporting this functionality (e.g. current Redis implementation does su…