Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Paste
P598
Update lost tasks' status following rabbitmq restart
Active
Public
Actions
Authored by
ardumont
on Feb 27 2020, 10:09 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
with
lost_task_runs
as
(
select
task_run
.
id
from
task
inner
join
task_run
on
task
.
id
=
task_run
.
task
where
task
.
policy
=
'recurring'
and
task
.
status
=
'next_run_scheduled'
and
task_run
.
status
=
'scheduled'
and
task_run
.
scheduled
<
now
()
-
'1 days'
::
interval
limit
1000
)
update
task_run
set
status
=
'lost'
from
lost_task_runs
where
task_run
.
id
=
lost_task_runs
.
id
;
Event Timeline
ardumont
created this paste.
Feb 27 2020, 10:09 AM
2020-02-27 10:09:46 (UTC+1)
ardumont
edited the content of this paste.
(Show Details)
Log In to Comment