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

Fix pause method #929

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/models/maintenance_tasks/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ def cancel
def pause
if stuck?
self.status = :paused
self.ended_at = Time.now
persist_transition
else
pausing!
Expand Down
1 change: 0 additions & 1 deletion test/models/maintenance_tasks/run_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ class RunTest < ActiveSupport::TestCase
travel Run::STUCK_TASK_TIMEOUT
run.pause
assert_predicate run, :paused?
assert_equal Time.now, run.ended_at
end

test "#persist_error rescues and retries ActiveRecord::StaleObjectError" do
Expand Down