View Source Ash.Reactor.Notifications (ash v3.4.36)

Reactor middleware used to collect and emit notifications upon successful completion of the Reactor.

Summary

Functions

When the reactor completes successfully, publish any queued notifications.

Add notifications to the queue to be published on reactor success.

When the reactor fails, discard any queued notifications.

When halting the reactor, store any queued notifications in the context for eventual resumption.

When starting a reactor, start an agent to act as a temporary store of notifications.

Dispatch notifications.

Functions

Link to this function

complete(result, context)

View Source

When the reactor completes successfully, publish any queued notifications.

Link to this function

enqueue_notifications(context, notifications)

View Source
@spec enqueue_notifications(
  Reactor.context(),
  Enumerable.t(Ash.Notifier.Notification.t())
) ::
  :ok | {:error, any()}

Add notifications to the queue to be published on reactor success.

When the reactor fails, discard any queued notifications.

When halting the reactor, store any queued notifications in the context for eventual resumption.

When starting a reactor, start an agent to act as a temporary store of notifications.

Link to this function

publish(context, notifications)

View Source

Dispatch notifications.