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
This means that if we need rescheduling, we need to generate a new random schedule_uuid for each new schedule and track it client side. This makes it a bit more difficult and doesn't guarantee schedule uniqueness (in the example above that we have a single active schedule per single seat), e.g.:
As you've discovered the current behaviour is by design (a command or batch may only be scheduled once), but it could be changed. I'm happy to accept a PR to add a Scheduler.reschedule function.
Thank you! I'll try to prepare a PR with support for rescheduling.
Regarding allowing a schedule to be scheduled again after cancellation: I think if we have rescheduling implemented, this would no longer be necessary, but still worth adding. Let me know what you prefer.
It is currently not possible to schedule a command using
schedule_uuid
that was previously cancelled:This is because command handlers for scheduling are allowed only when the schedule aggregate instance does not exist yet:
https://github.com/commanded/commanded-scheduler/blob/master/lib/commanded/scheduler/schedule/schedule.ex#L27
This means that if we need rescheduling, we need to generate a new random
schedule_uuid
for each new schedule and track it client side. This makes it a bit more difficult and doesn't guarantee schedule uniqueness (in the example above that we have a single active schedule per single seat), e.g.:I believe it might also be useful to have some kind of rescheduling of a command, something like:
The text was updated successfully, but these errors were encountered: