bensheldon/good_job · error · ArgumentError
GoodJob execution mode must be one of #{EXECUTION_MODES.join
Error message
GoodJob execution mode must be one of #{EXECUTION_MODES.join(', ')}. It was '#{execution_mode}' which is not valid. What it means
Error "GoodJob execution mode must be one of #{EXECUTION_MODES.join(', ')}. It was '#{execution_mode}' which is not valid." thrown in bensheldon/good_job.
Source
Thrown at lib/good_job/configuration.rb:52
# Default to enabling LISTEN/NOTIFY
DEFAULT_ENABLE_LISTEN_NOTIFY = true
# Default Dashboard I18n locale
DEFAULT_DASHBOARD_DEFAULT_LOCALE = :en
# Default Dashboard Live Poll button enabled
DEFAULT_DASHBOARD_LIVE_POLL_ENABLED = true
# Default enqueue_after_transaction_commit
DEFAULT_ENQUEUE_AFTER_TRANSACTION_COMMIT = false
# Default enable_pauses setting
DEFAULT_ENABLE_PAUSES = false
# Default number of candidate jobs to query when polling
DEFAULT_QUEUE_SELECT_LIMIT = 1_000
# Valid dequeue query sorts
DEQUEUE_QUERY_SORTS = [:created_at, :scheduled_at].freeze
# Valid lock strategies
LOCK_STRATEGIES = [:advisory, :skiplocked, :hybrid].freeze
def self.validate_execution_mode(execution_mode)
raise ArgumentError, "GoodJob execution mode must be one of #{EXECUTION_MODES.join(', ')}. It was '#{execution_mode}' which is not valid." unless execution_mode.in?(EXECUTION_MODES)
end
def self.validate_dequeue_query_sort(dequeue_query_sort)
raise ArgumentError, "GoodJob dequeue query sortmust be one of #{DEQUEUE_QUERY_SORTS.join(', ')}. It was '#{dequeue_query_sort}' which is not valid." unless dequeue_query_sort.in?(DEQUEUE_QUERY_SORTS)
end
# The options that were explicitly set when initializing +Configuration+.
# It is safe to modify this hash in place; be sure to symbolize keys.
# @return [Hash]
attr_reader :options
# The environment from which to read GoodJob's environment variables. By
# default, this is the current process's environment, but it can be set
# to something else in {#initialize}.
# @return [Hash]
attr_reader :env
# Returns the maximum number of threads GoodJob might consumeView on GitHub (pinned to 5fcde48f87)
Solutions
- Set execution_mode to one of the listed valid modes (:async, :external, :inline).
- Fix config.good_job.execution_mode or the GOOD_JOB_EXECUTION_MODE env var to a valid value.
Example fix
config.good_job.execution_mode = :async
When it happens
Trigger: Thrown at lib/good_job/configuration.rb:52 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of bensheldon/good_job@5fcde48f87 (2026-08-23).
Data as JSON: /api/errors/3142845903c4112d.
Report an issue: GitHub.