Fixes a adjustedment made to the YAML part of Ruby #483

Merged
merged 4 commits into from May 31, 2013

Conversation

Projects
None yet
6 participants

Also see #482

A recent patch of Ruby breaks Delayed Job.

Owner

albus522 commented Feb 22, 2013

It would appear you broke more than you fixed. See the build status for details.

@davidakachaos davidakachaos Fixing errors reported by Travis
Should have run rake first before commiting -.- But now it passes!
5e34e6c

Changes Unknown when pulling 5e34e6c on davidakachaos:fix_yaml_error into * on collectiveidea:master*.

View Details

gilyo commented Feb 26, 2013

I've applied the fix and still getting an error in base.rb:85:in `payload_object'.
I'm using ruby-1.9.3-p286 (yaml version is 1.3.4). Any idea?

What error do you get? The travis build for 1.9.3 passes, but that one is patch p327

gilyo commented Feb 26, 2013

this is a partial stack trace when starting a worker via rake jobs:work

[Worker(host:domU-12-31-39-0A-04-C1 pid:4842)] Starting job worker
rake aborted!
({:safe=>false}): mapping keys are not allowed in this context at line 4
column 11
/home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/backend/base.rb:85:in
payload_object' /home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/backend/base.rb:71:inname'
/home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/worker.rb:230:in
handle_failed_job' /home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/worker.rb:191:inblock in run'
/home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/lifecycle.rb:60:in
call' /home/deploy/.rvm/gems/ruby-1.9.3-p286/bundler/gems/delayed_job-573d532a4be8/lib/delayed/lifecycle.rb:60:inblock in initialize'

On Tue, Feb 26, 2013 at 4:01 PM, David Westerink
notifications@github.comwrote:

What error do you get? The travis build for 1.9.3 passes, but that one is
patch p327


Reply to this email directly or view it on GitHubhttps://github.com/collectiveidea/delayed_job/pull/483#issuecomment-14115332
.

Changes Unknown when pulling d0002bd on davidakachaos:fix_yaml_error into * on collectiveidea:master*.

View Details

@sferik sferik commented on an outdated diff Apr 8, 2013

lib/delayed/backend/base.rb
@@ -82,7 +82,13 @@ def payload_object=(object)
end
def payload_object
- @payload_object ||= YAML.load(self.handler)
+ if YAML.methods.include?(:unsafe_load)
@sferik

sferik Apr 8, 2013

Collaborator

Why not use YAML.respond_to? instead of initializing an array?

laurens commented May 31, 2013

Hi any updates on this PR?

I think this would also fix #523

I just updated this with the suggestion from @sferik

Coverage Status

Changes Unknown when pulling f3e5de7 on davidakachaos:fix_yaml_error into * on collectiveidea:master*.

laurens commented May 31, 2013

Great, thanks David!

@sferik sferik added a commit that referenced this pull request May 31, 2013

@sferik sferik Merge pull request #483 from davidakachaos/fix_yaml_error
Fixes a adjustedment made to the YAML part of Ruby
80ad1f0

@sferik sferik merged commit 80ad1f0 into collectiveidea:master May 31, 2013

1 check passed

default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment