Skip to content

Commit

Permalink
update requeue and reload to use update instead of update_attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
atstockland authored Jan 30, 2021
1 parent 7ff3ad4 commit 21c5844
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/delayed_job_web/application/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ def csrf_token_tag

post "/requeue/:id" do
job = delayed_job.find(params[:id])
job.update_attributes(:run_at => Time.now, :failed_at => nil)
job.update(run_at: Time.now, failed_at: nil)
redirect back
end

post "/reload/:id" do
job = delayed_job.find(params[:id])
job.update_attributes(:run_at => Time.now, :failed_at => nil, :locked_by => nil, :locked_at => nil, :last_error => nil, :attempts => 0)
job.update(run_at: Time.now, failed_at: nil, locked_by: nil, locked_at: nil, last_error: nil, attempts: 0)
redirect back
end

Expand Down Expand Up @@ -192,7 +192,7 @@ def partial(template, local_vars = {})
@partial = false
end

%w(overview enqueued working pending failed stats) .each do |page|
%w[overview enqueued working pending failed stats].each do |page|
get "/#{page}.poll" do
show_for_polling(page)
end
Expand Down

0 comments on commit 21c5844

Please sign in to comment.