Squidie.Runtime.DispatchNotifier behaviour (squidie v0.1.2)

Copy Markdown View Source

Boundary for live dispatch wakeups emitted after durable scheduling.

Wakeups are hints only. Durable dispatch entries remain the source of truth, so a notifier failure must not roll back or hide a scheduled attempt.

Summary

Functions

Emits a live wakeup hint for a scheduled attempt through the configured notifier.

Types

attempt()

@type attempt() :: %{
  run_id: String.t(),
  runnable_key: String.t(),
  queue: String.t(),
  visible_at: DateTime.t()
}

Callbacks

notify_attempt_scheduled(attempt, keyword)

@callback notify_attempt_scheduled(
  attempt(),
  keyword()
) :: :ok | {:error, term()}

Functions

notify_attempt_scheduled(notifier, attempt, opts)

@spec notify_attempt_scheduled(module(), attempt(), keyword()) ::
  :ok | {:error, term()}

Emits a live wakeup hint for a scheduled attempt through the configured notifier.