Ecto schema for good_jobs table.
Represents a job in the queue.
Summary
Functions
Builds a job for enqueueing.
Creates a changeset for a job.
Deletes a job from the database.
Deletes multiple jobs in two queries (fetch by id, then delete all matching rows).
Enqueues a job.
Retries a discarded job by clearing its finished_at and error fields.
Retries multiple jobs in one UPDATE, matching retry/1 field changes.
Types
@type t() :: %GoodJob.Job{ __meta__: term(), active_job_id: term(), batch_callback_id: term(), batch_id: term(), concurrency_key: term(), cron_at: term(), cron_key: term(), error: term(), error_event: term(), executions_count: term(), finished_at: term(), id: term(), inserted_at: term(), is_discrete: term(), job_class: term(), labels: term(), lock_type: term(), locked_at: term(), locked_by_id: term(), performed_at: term(), priority: term(), queue_name: term(), retried_good_job_id: term(), scheduled_at: term(), serialized_params: term(), updated_at: term() }
Functions
Builds a job for enqueueing.
Creates a changeset for a job.
Deletes a job from the database.
@spec delete_many([Ecto.UUID.t() | String.t()]) :: {:ok, non_neg_integer()} | {:error, term()}
Deletes multiple jobs in two queries (fetch by id, then delete all matching rows).
Emits the same PubSub and telemetry events per job as delete/1.
ids may be a list of t:Ecto.UUID strings (as returned from the database or UI).
@spec discarded(Ecto.Query.t() | module()) :: Ecto.Query.t()
Enqueues a job.
This inserts the row only; it does not run GoodJob.Concurrency checks. Use GoodJob.enqueue/3
when you need per-key enqueue limits enforced before insert.
Options
:listen_notify- Whenfalse, skipspg_notify(PubSub and telemetry still run). Used byGoodJob.Bulkto send a single notification after a batch insert.
Retries a discarded job by clearing its finished_at and error fields.
@spec retry_many([Ecto.UUID.t() | String.t()]) :: {:ok, non_neg_integer()} | {:error, term()}
Retries multiple jobs in one UPDATE, matching retry/1 field changes.
Emits the same PubSub and telemetry events per job as retry/1 (using structs
loaded before the update).
@spec succeeded(Ecto.Query.t() | module()) :: Ecto.Query.t()