X3m.System.Scheduler.save_alarm
You're seeing just the callback
save_alarm
, go back to X3m.System.Scheduler module for more information.
Specs
save_alarm(X3m.System.Message.t(), aggregate_id :: String.t(), state :: any()) :: :ok | {:ok, X3m.System.Message.t()}
This callback is invoked when X3m.System.Message
should be saved as an alarm.
Time when it should be dispatched is set in its assigns.dispatch_at
as DateTime
.
3rd parameter (state) is the one that was set when Scheduler's start_link/1
was
called.
If {:ok, X3m.System.Message.t()}
is returned, than that message will be dispatched instead
of original one. This can be used to inject something in message assigns during save_alarm
.