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

Link to this function

abandon_callback_max_duration()

View Source

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

do_abandon(module, payload, metadata, context)

View Source
@spec do_abandon(
  module(),
  map() | binary(),
  Antikythera.AsyncJob.Metadata.t(),
  Antikythera.Context.t()
) :: any()
Link to this function

do_run(module, payload, metadata, context)

View Source
Link to this function

run(pid, queue_name, job_key, job)

View Source