ExEventBus.Publisher (ExEventBus v0.3.0)
View SourcePublishes events to the event bus.
Summary
Functions
Creates the job changesets used to publish the given event and its subscribers.
Publishes the events by enqueueing the ExEventBus.Worker jobs in the Oban queue. Takes the oban instance name and the job changesets as input. Returns the list of the enqueued Oban.Jobs.
Functions
@spec create_job_changesets( subscribers :: [atom()], event :: ExEventBus.Event.t(), acc :: [Ecto.Changeset.t()] ) :: [Ecto.Changeset.t()]
Creates the job changesets used to publish the given event and its subscribers.
@spec publish( oban_name :: atom(), job_changesets :: [Ecto.Changeset.t()], opts :: Keyword.t() ) :: result :: [Oban.Job.t()] | Ecto.Multi.t()
Publishes the events by enqueueing the ExEventBus.Worker jobs in the Oban queue. Takes the oban instance name and the job changesets as input. Returns the list of the enqueued Oban.Jobs.