Open carlson opened 15 years ago
Looks like it may have been related to using sqlite - will verify
On Sqlite:
> script/console
> Loading development environment (Rails 2.3.4)
>> class A
>> def b
>> raise "some error"
>> end
>> end
=> nil
>> a = A.new
=> #
>> Delayed::Job.destroy_all
=> [#<Delayed::Job id: 14, priority: 0, attempts: 1, handler: "
>> a.send_later(:b)
=> #<Delayed::Job id: 15, priority: 0, attempts: 0, handler: "
*\ Starting job worker host:dmitry-laptop pid:9039
On MySQL:
script/console
Loading development environment (Rails 2.3.4)
?> class A
>> def b
>> raise "some error"
>> end
>> end
=> nil
>> a = A.new
=> #
>> Delayed::Job.destroy_all
=> []
>> a.send_later(:b)
=> #<Delayed::Job id: 1, priority: 0, attempts: 0, handler: "--- !ruby/struct:Delayed::PerformableMethod \nobject...", last_error: nil, run_at: "2009-12-14 09:33:38", locked_at: nil, failed_at: nil, locked_by: nil, created_at: "2009-12-14 09:33:38", updated_at: "2009-12-14 09:33:38">
>> Delayed::Worker.new.start
*\ Starting job worker host:dmitry-laptop pid:10479
Under normal conditions delayed jobs run and report results as expected:
However, when a job fails, it attempts to perform it a second time and displays the result as 2 errors:
Here is the code that performs the delayed job: