Skip to content

Commit

Permalink
fix: handle old abandoned replay requests (#290) (#291)
Browse files Browse the repository at this point in the history
* fix: handle old abandoned replay requests

* fix: handle old abandoned replay requests
  • Loading branch information
Mryashbhardwaj authored Oct 25, 2024
1 parent f75ea8d commit 500fd0d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- this migration does not have an appropriate down migration
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- cancel replay requests that are not in terminal state and have not been handled in the last 4 hours
update
replay_request
set
status = 'cancelled',
message = 'canceled by optimus migration 000065'
where
status in ('created', 'in progress')
and (now() - updated_at) > INTERVAL '4 HOURS';

0 comments on commit 500fd0d

Please sign in to comment.