View Source FaktoryWorker.Sandbox (faktory_worker v1.9.8)

When started with sandbox mode enabled, FaktoryWorker won't connect to a running Faktory instance or perform queued jobs, but will instead record all jobs enqueued locally.

In general, this mode should only be used during testing. See Sandbox Testing to read more.

Summary

Types

A concise description of a single call to a job module.

Functions

Returns true if sandbox mode is enabled.

Returns a list of all locally enqueued jobs across all job modules, in the order that they were enqueued. If you only want to retrieve jobs enqueued for a specific job module, use all_jobs/1 instead.

Returns a list of all locally enqueued jobs for the given job module, in the order that they were enqueued. If you want to retrieve a list of all jobs across all job modules, use all_jobs/0 instead.

Returns a specification to start this module under a supervisor.

Clear the queue history for all job modules.

Clear the queue history for the given job module.

Types

job()

@type job() :: %{worker: module(), args: list(), opts: Keyword.t()}

A concise description of a single call to a job module.

Functions

active?()

@spec active?() :: boolean()

Returns true if sandbox mode is enabled.

all_jobs()

@spec all_jobs() :: [job()]

Returns a list of all locally enqueued jobs across all job modules, in the order that they were enqueued. If you only want to retrieve jobs enqueued for a specific job module, use all_jobs/1 instead.

all_jobs(worker_mod)

@spec all_jobs(module()) :: [job()]

Returns a list of all locally enqueued jobs for the given job module, in the order that they were enqueued. If you want to retrieve a list of all jobs across all job modules, use all_jobs/0 instead.

batch_id()

batch_status()

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

reset()

@spec reset() :: :ok

Clear the queue history for all job modules.

reset(worker_mod)

@spec reset(module()) :: :ok

Clear the queue history for the given job module.