antikythera v0.3.0 AntikytheraCore.ExecutorPool.AsyncJobRunner View Source
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.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Link to this function
do_abandon(module, payload, metadata, context)
View Sourcedo_abandon( module(), map() | binary(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t() ) :: any()
Link to this function
do_run(module, payload, metadata, context)
View Sourcedo_run( module(), map(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t() ) :: any()
Link to this function
run(pid, queue_name, job_key, job)
View Sourcerun( pid(), atom() | nil, AntikytheraCore.AsyncJob.Queue.JobKey.t(), AntikytheraCore.AsyncJob.t() ) :: :ok