{"record":{"id":"3142845903c4112d","repo":"bensheldon/good_job","slug":"goodjob-execution-mode-must-be-one-of-execution","errorCode":null,"errorMessage":"GoodJob execution mode must be one of #{EXECUTION_MODES.join(', ')}. It was '#{execution_mode}' which is not valid.","messagePattern":"GoodJob execution mode must be one of #(.+?)\\. It was '#(.+?)' which is not valid\\.","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/good_job/configuration.rb","lineNumber":52,"sourceCode":"    # Default to enabling LISTEN/NOTIFY\n    DEFAULT_ENABLE_LISTEN_NOTIFY = true\n    # Default Dashboard I18n locale\n    DEFAULT_DASHBOARD_DEFAULT_LOCALE = :en\n    # Default Dashboard Live Poll button enabled\n    DEFAULT_DASHBOARD_LIVE_POLL_ENABLED = true\n    # Default enqueue_after_transaction_commit\n    DEFAULT_ENQUEUE_AFTER_TRANSACTION_COMMIT = false\n    # Default enable_pauses setting\n    DEFAULT_ENABLE_PAUSES = false\n    # Default number of candidate jobs to query when polling\n    DEFAULT_QUEUE_SELECT_LIMIT = 1_000\n    # Valid dequeue query sorts\n    DEQUEUE_QUERY_SORTS = [:created_at, :scheduled_at].freeze\n    # Valid lock strategies\n    LOCK_STRATEGIES = [:advisory, :skiplocked, :hybrid].freeze\n\n    def self.validate_execution_mode(execution_mode)\n      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)\n    end\n\n    def self.validate_dequeue_query_sort(dequeue_query_sort)\n      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)\n    end\n\n    # The options that were explicitly set when initializing +Configuration+.\n    # It is safe to modify this hash in place; be sure to symbolize keys.\n    # @return [Hash]\n    attr_reader :options\n\n    # The environment from which to read GoodJob's environment variables. By\n    # default, this is the current process's environment, but it can be set\n    # to something else in {#initialize}.\n    # @return [Hash]\n    attr_reader :env\n\n    # Returns the maximum number of threads GoodJob might consume","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/bensheldon/good_job/blob/5fcde48f8765e69901ffa9c5a06122b19c73875f/lib/good_job/configuration.rb#L34-L70","documentation":"Error \"GoodJob execution mode must be one of #{EXECUTION_MODES.join(', ')}. It was '#{execution_mode}' which is not valid.\" thrown in bensheldon/good_job.","triggerScenarios":"Thrown at lib/good_job/configuration.rb:52 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":"config.good_job.execution_mode = :async","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5fcde48f8765e69901ffa9c5a06122b19c73875f","analyzedAt":"2026-08-23T14:55:11.399Z","schemaVersion":2},"datasetVersion":"2026-08-23T16:17:53.355Z"}