antikythera v0.2.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
Link to this section Functions
Link to this function
do_abandon(module, payload, metadata, context)
View Source
do_abandon(module(), map(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t()) :: any()
Link to this function
do_run(module, payload, metadata, context)
View Source
do_run(module(), map(), Antikythera.AsyncJob.Metadata.t(), Antikythera.Context.t()) :: any()
Link to this function
run(pid, queue_name, job_key, job)
View Source
run(pid(), atom(), AntikytheraCore.AsyncJob.Queue.JobKey.t(), AntikytheraCore.AsyncJob.t()) :: :ok