So there is a task to implement. Where user can give N
number of tasks with start time and end time. And we need to run T
tasks in a batch then check if end time is exceeded or not. For this this I thought of implementing a celery chain where there will be group of T
tasks and then a can_proceed
method which checks if current time exceeded end time or not.
workflow = group(t.s() for 0-T) | can_proceed(end_time) | group(t.s() for T-2T).....
I want to do something like this.
workflow.apply_async(eta=start_time)
One solution I thought is to run apschedular which will start workflow at specified time. But don’t know whether that is good approach or not. How do I execute my chain with eta?
submitted by /u/CriticalDiscussion37
[link] [comments]
r/learnpython So there is a task to implement. Where user can give N number of tasks with start time and end time. And we need to run T tasks in a batch then check if end time is exceeded or not. For this this I thought of implementing a celery chain where there will be group of T tasks and then a can_proceed method which checks if current time exceeded end time or not. workflow = group(t.s() for 0-T) | can_proceed(end_time) | group(t.s() for T-2T)….. I want to do something like this. workflow.apply_async(eta=start_time) One solution I thought is to run apschedular which will start workflow at specified time. But don’t know whether that is good approach or not. How do I execute my chain with eta? submitted by /u/CriticalDiscussion37 [link] [comments]
So there is a task to implement. Where user can give N
number of tasks with start time and end time. And we need to run T
tasks in a batch then check if end time is exceeded or not. For this this I thought of implementing a celery chain where there will be group of T
tasks and then a can_proceed
method which checks if current time exceeded end time or not.
workflow = group(t.s() for 0-T) | can_proceed(end_time) | group(t.s() for T-2T).....
I want to do something like this.
workflow.apply_async(eta=start_time)
One solution I thought is to run apschedular which will start workflow at specified time. But don’t know whether that is good approach or not. How do I execute my chain with eta?
submitted by /u/CriticalDiscussion37
[link] [comments]