View Source AntikytheraCore.ExecutorPool.AsyncJobRunner (antikythera v0.5.1)
An ephemeral GenServer
process under PoolSup
that manages an execution of an async job.
Actual execution of gear's code is done within a separate process for the following reasons:
- for cleaner error handling
- to introduce timeout of job execution
- to be responsive to system messages
When the separate process terminates, this GenServer
updates/deletes the locked job in the queue
depending on the result of the execution.
Note that when no job is registered in the job queue, successfully checked-out process is immediately checked in.
See implementation of AntikytheraCore.ExecutorPool.AsyncJobBroker
.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec do_abandon( module(), map() | binary(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t() ) :: any()
@spec do_run( module(), map(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t() ) :: any()
@spec run( pid(), atom() | nil, AntikytheraCore.AsyncJob.Queue.JobKey.t(), AntikytheraCore.AsyncJob.t() ) :: :ok