Skip to content

A recurring job that has on_conflict: :discard AND triggers conflict condition generates a NotNullViolation #598

@hms

Description

@hms
class DummyJob < ApplicationJob
  limits_concurrency to: 1, key: -> { true }, on_conflict: :discard

  def perform; end
end

with recurring.yml

production:
  Dummy1:
    class: DummyJob
    schedule: every second

will generate the following error when the discard condition is met:
SolidQueue-1.2.0 Error in thread (0.0ms) error: "ActiveRecord::NotNullViolation PG::NotNullViolation: ERROR: null value in column "job_id" of relation "solid_queue_recurring_executions" violates not-null constraint\nDETAIL: Failing row contains (32287, 2025-07-14 22:31:31.036194, null, 2025-07-14 22:31:31, Dummy1)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions