Ant.Worker behaviour (Ant v0.0.2)
Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1
.
Types
@type t() :: %Ant.Worker{ args: map(), attempts: non_neg_integer(), errors: [map()], id: non_neg_integer(), opts: keyword(), queue_name: String.t(), scheduled_at: DateTime.t(), status: :enqueued | :running | :scheduled | :completed | :failed | :retrying | :cancelled, updated_at: DateTime.t(), worker_module: module() }
Callbacks
@callback calculate_delay(worker :: t()) :: non_neg_integer()
Link to this callback
perform(worker)
Functions
Link to this function
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
init(worker)
Callback implementation for GenServer.init/1
.
Link to this function
perform(worker_pid)
Link to this function