Where video exports wait their turn and run.
PhoenixReplay.Export.Queue.Local, the default, keeps them in memory on
the node that asked for them. PhoenixReplay.Export.Queue.Oban keeps
them in your Oban queue, so they survive restarts and run on any node
of a cluster. The :queue option of :export chooses one: a module, or
{module, opts}.
Either way, every change to a job is broadcast with broadcast/1, so
PhoenixReplay.Export.subscribe/1 follows jobs from either.
Summary
Callbacks
Cancels the job with id, if it is queued or running. A running one is
asked to stop, and ends :cancelled.
The job with id, if it is still kept.
The latest job for a recording, if one is kept.
Queues an export of a recording, unless one is queued or running, which is returned instead.
Functions
Tells subscribers of the job's recording that it changed. Nobody may be listening, and the export goes on either way.
The queue config exports through.
Subscribes the caller to the jobs of a recording; see broadcast/1.
Types
Callbacks
@callback cancel(PhoenixReplay.Export.Job.id(), keyword()) :: :ok
Cancels the job with id, if it is queued or running. A running one is
asked to stop, and ends :cancelled.
@callback get(PhoenixReplay.Export.Job.id(), keyword()) :: PhoenixReplay.Export.Job.t() | nil
The job with id, if it is still kept.
@callback latest(PhoenixReplay.Recording.id(), keyword()) :: PhoenixReplay.Export.Job.t() | nil
The latest job for a recording, if one is kept.
@callback start( PhoenixReplay.Recording.id(), PhoenixReplay.Config.t(), PhoenixReplay.Export.Options.t(), keyword() ) :: {:ok, PhoenixReplay.Export.Job.t()}
Queues an export of a recording, unless one is queued or running, which is returned instead.
Functions
@spec broadcast(PhoenixReplay.Export.Job.t()) :: :ok
Tells subscribers of the job's recording that it changed. Nobody may be listening, and the export goes on either way.
@spec of(PhoenixReplay.Config.t()) :: t()
The queue config exports through.
@spec subscribe(PhoenixReplay.Recording.id()) :: :ok | {:error, term()}
Subscribes the caller to the jobs of a recording; see broadcast/1.