You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scheduler only queues job on a certain interval. If your enqueue_time falls between intervals, it will not be added to the queue until the next interval (which will then be picked up by your worker). Look at https://github.com/rq/rq-scheduler#running-the-scheduler - specifically about the interval.
@dfrank8 Hi, Thanks for replying. Can you please tell me the default interval?
By what you have explained, I think this is exactly what's happening because if I have queued some tasks, all of them execute at the same time.
def schedule_task(func, delaytime=1, *args,**kwargs): enqueue_time = datetime.utcnow() + timedelta(seconds=delaytime) scheduler.enqueue_at(enqueue_time, delay_queue_handler, func, *args,**kwargs)
This is how I am trying to schedule my task. However, it takes more than 25-30 seconds before it sends my task to the worker.
What can I do to fix this?
Or if I am not approaching this well, please let me know
This is how my scheduler is initializing
scheduler = Scheduler('default',connection=redis_conn)
The text was updated successfully, but these errors were encountered: