Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

ActiveRecord / oracle-enhanced-adapter includes mystery column "JOB_ID" in enqueue insert #73

Closed
stokes770 opened this Issue Aug 20, 2013 · 1 comment

Comments

Projects
None yet
2 participants

Rails 3.2.13, Ruby 1.9.3
Using 4.0.0 delayed_job / delayed_job_active_record

Enqueue seems to be trying to send a job_id to the insert, but I can't figure out where this column is coming from. Job_id doesn't exist in the delayed_jobs table obviously...assuming it is related to my use of oracle-enhanced which I'm not sure is supported.

Note the JOB_ID column in the insert, with a value pair of [nil,27], where 27 is the delayed_job table sequence nextval. Looks like somehow the delayed_job_id column is getting crossed up and this job_id is getting added.

In console:

INSERT INTO "DELAYED_JOBS" ("ATTEMPTS", "CREATED_AT", "DELAYED_JOB_ID", "FAILED_AT", "HANDLER", "JOB_ID", "LAST_ERROR", "LOCKED_AT", "LOCKED_BY", "PRIORITY", "QUEUE", "RUN_AT", "UPDATED_AT") VALUES (:a1, :a2, :a3, :a4, :a5, :a6, :a7, :a8, :a9, :a10, :a11, :a12, :a13) [["attempts", 0], ["created_at", Fri, 16 Aug 2013 18:58:37 UTC +00:00], ["delayed_job_id", nil], ["failed_at", nil], ["handler", "---!ruby/object:Delayed::PerformableMethod\nobject: !ruby/object:QueueProcessor {}\nmethod_name: :perform\nargs: []\n"], [nil, 27], ["last_error", nil], ["locked_at", nil], ["locked_by", nil], ["priority", 0], ["queue", nil], ["run_at", Fri, 16 Aug 2013 18:58:37 UTC +00:00], ["updated_at",Fri, 16 Aug 2013 18:58:37 UTC +00:00]]
NoMethodError: undefined method `returning_id?' for nil:NilClass: INSERT INTO "DELAYED_JOBS" ("ATTEMPTS", "CREATED_AT", "DELAYED_JOB_ID", "FAILED_AT", "HANDLER", "JOB_ID", "LAST_ERROR", "LOCKED_AT", "LOCKED_BY", "PRIORITY", "QUEUE", "RUN_AT", "UPDATED_AT") VALUES (:a1, :a2, :a3, :a4, :a5, :a6, :a7, :a8, :a9, :a10, :a11, :a12, :a13)

Any help appreciated...I'd prefer not to write my own if I can make delayed_jobs work!

Owner

albus522 commented Sep 25, 2014

DELAYED_JOB_ID and JOB_ID do not make any sense to me. This appears to be something weird with oracle.

@albus522 albus522 closed this Sep 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment