Open agordeev opened 8 years ago
@andrew8712 I've been bitten by this one too—job name change works and so does running a FLUSHALL
command against your Redis DB, but it also nukes all the data in there.
@andrew8712 do you run on a single server or multiple servers? If I run on a single node server the very works correctly, but in case of multiple servers (let say 3) the every fire x3 times. Don't use ever in multi server environment until the repo will fix that/
There is only one server in my environment.
kue.every uses redis itself to handling the recurring schedule - in kue to re-schedule a job, you need to delete that job first before re-adding by the same name.
Also @mmarshak a hangup that bites people with this is that every server will schedule, setting the job as unique should work in a multi-server environment at this time, and ensures multiple instances don't get scheduled - but I do have a feature request in that may make that more flexible.
On Wed, Jan 18, 2017 at 3:02 AM, Andrey Gordeev notifications@github.com wrote:
There is only one server in my environment.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lykmapipo/kue-scheduler/issues/45#issuecomment-273408688, or mute the thread https://github.com/notifications/unsubscribe-auth/ABTsf2O2pVOXLB8ui_DBhDF324oDZ80Cks5rTccVgaJpZM4Jcboj .
@gmcnaught I tested it with node with 3 server running at the same time with 'every' with and without unique and the job was created multiple times instead of once.
Here's my code:
Before this I had interval set to 10 seconds with the same job name for testing purposes. Now I changed it to 60 minutes and restarted the app. However, my job fires much more often than once in an hour. Does
kue
keep queue persistent between the app launches? How should I handle this case? The only workaround I found is to changejobName
.