MailglassInbound.OptionalDeps.Oban (MailglassInbound v0.1.0)

Copy Markdown View Source

Gateway for the optional Oban dependency ({:oban, "~> 2.21"}).

Phase 39 does not ship an async execution runner. This module exists so later execution plans can branch on Oban availability without turning Oban into a mandatory install-time or runtime dependency for the package.

The public promise in this phase is intentionally small:

  • available?/0 reports whether :oban is loaded in the current runtime.
  • callers may use runner/0 to name the future execution mode without referencing Oban directly outside this gateway.

No %Oban.Job{} contract, queue names, worker modules, or execution hooks are part of the Phase 39 package surface.

Summary

Functions

Returns true when :oban is loaded in the current runtime.

Enqueues an internal inbound execution worker job when Oban is available.

Reports which execution seam is available for future internal runners.

Functions

available?()

@spec available?() :: boolean()

Returns true when :oban is loaded in the current runtime.

enqueue_inbound_execution(worker, attrs, opts \\ [])

@spec enqueue_inbound_execution(module(), map(), keyword()) ::
  {:ok, term()} | {:error, term()}

Enqueues an internal inbound execution worker job when Oban is available.

runner()

@spec runner() :: :oban | :task_supervisor

Reports which execution seam is available for future internal runners.