Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker crashes when there is an error deserializing the handler #906

Open
afn opened this issue Apr 7, 2016 · 0 comments · May be fixed by #907
Open

Worker crashes when there is an error deserializing the handler #906

afn opened this issue Apr 7, 2016 · 0 comments · May be fixed by #907

Comments

@afn
Copy link

afn commented Apr 7, 2016

# Note: this delegator has a __getobj__ method but no __setobj__
class TestClass < Delegator
  def initialize obj
    @obj = obj
  end

  def __getobj__
    @obj
  end
end

Kernel.delay.puts(TestClass.new('foo'))
Delayed::Worker.new.work_off
# => NotImplementedError: need to define `__setobj__'
#    from /Users/afn/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/delegate.rb:168:in `__setobj__'

I would expect the worker to flag the job as errored and continue on, rather than crashing.

Will follow up shortly with a PR.

afn pushed a commit to afn/delayed_job that referenced this issue Apr 7, 2016
@afn afn linked a pull request Apr 7, 2016 that will close this issue
afn pushed a commit to afn/delayed_job that referenced this issue Jan 2, 2018
bronzdoc pushed a commit to bronzdoc/delayed_job that referenced this issue Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant