commanded/commanded-scheduler

Batch schedule multiple commands in a single request

slashdotdash opened this issue · 0 comments

It's currently only possible to schedule one-off and recurring commands one at a time.

It would be useful to allow scheduling multiple commands, grouped together, to provide an "all or none" guarantee.

Example

Scheduler.batch(reservation_id, fn batch ->
  batch
  |> Scheduler.schedule_once(%TimeoutReservation{..}, timeout_due_at)
  |> Scheduler.schedule_once(%ReleaseSeat{..}, release_due_at)
end)