Skip to content

Commit

Permalink
Don't set ended_at when pausing stuck runs (#929)
Browse files Browse the repository at this point in the history
  • Loading branch information
Schwad authored Dec 8, 2023
1 parent b08fbb8 commit 3542fb0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
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

0 comments on commit 3542fb0

Please sign in to comment.