Rescheduling on success #429
DrewEaster
started this conversation in
General
Replies: 1 comment 1 reply
-
This is currently supported using a CustomTask
fre. 13. okt. 2023 kl. 16:42 skrev Andrew Easter ***@***.***>:
… Hi, thanks for the great library!
We have a requirement where, rather than having fixed recurring tasks,
we'd like to have one time tasks that get to decide at the end of their
execution when they'd like to be rescheduled. This is actually very similar
to the failure handling scenario where you get to choose, on failed
execution, when to try again - only in our case we'd like to be able to do
this in the success case too.
Problem I have is that, currently the SchedulerClient does not allow
rescheduling of a task that's been picked and, at the point that I need to
call reschedule(), it's still within the execution handling of the task
(in which case the the execution is still considered picked).
I could, of course, be devious and directly mutate the row in the DB
table, but it would be considerably more preferable to avoid that,
especially as I'm conscious of not wanting to create any unforeseen issues
by bypassing the code.
Do you have any thoughts on how this could be achieved without changes to
db-scheduler itself?
—
Reply to this email directly, view it on GitHub
<#429>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABKEHEXWF2EM3YOADDNU3LX7FHNRANCNFSM6AAAAAA57IMAYQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for the great library!
We have a requirement where, rather than having fixed recurring tasks, we'd like to have one time tasks that get to decide at the end of their execution when they'd like to be rescheduled. This is actually very similar to the failure handling scenario where you get to choose, on failed execution, when to try again - only in our case we'd like to be able to do this in the success case too.
Problem I have is that, currently the
SchedulerClient
does not allow rescheduling of a task that's been picked and, at the point that I need to callreschedule()
, it's still within the execution handling of the task (in which case the the execution is still considered picked).I could, of course, be devious and directly mutate the row in the DB table, but it would be considerably more preferable to avoid that, especially as I'm conscious of not wanting to create any unforeseen issues by bypassing the code.
Do you have any thoughts on how this could be achieved without changes to db-scheduler itself?
Beta Was this translation helpful? Give feedback.
All reactions