@@ -90,16 +90,16 @@ UPDATE submission set backoff_until = NULL, last_backoff = NULL where backoff_un
9090Check for old stuck runs:
9191``` sql
9292\x auto
93- SELECT * FROM branch WHERE status= ' testing' ;
94- SELECT * FROM build WHERE created < now() - interval ' 5 hours' AND status= ' EXECUTING' ;
95- SELECT * FROM task WHERE created < now() - interval ' 5 hours' AND status not in (' FAILED' , ' ABORTED' , ' ERRORED' , ' COMPLETED' , ' PAUSED' );
93+ SELECT * FROM branch WHERE status= ' testing' and created < now() - interval ' 2 hours ' ;
94+ SELECT * FROM build WHERE created < now() - interval ' 2 hours' AND status= ' EXECUTING' ;
95+ SELECT * FROM task WHERE created < now() - interval ' 2 hours' AND status not in (' FAILED' , ' ABORTED' , ' ERRORED' , ' COMPLETED' , ' PAUSED' );
9696```
9797
9898Remove all runs that have been stuck for a while:
9999``` sql
100- UPDATE branch SET status = ' failed' WHERE status= ' testing' and created < now() - interval ' 5 hours' ;
101- UPDATE build SET status = ' FAILED' WHERE created < now() - interval ' 5 hours' AND status= ' EXECUTING' ;
102- UPDATE task SET status = ' FAILED' WHERE created < now () - interval ' 5 hours' AND status not in (' FAILED' , ' ABORTED' , ' ERRORED' , ' COMPLETED' , ' PAUSED' );
100+ UPDATE branch SET status = ' failed' WHERE status= ' testing' and created < now() - interval ' 2 hours' RETURNING branch . id ;
101+ UPDATE build SET status = ' FAILED' WHERE created < now() - interval ' 2 hours' AND status= ' EXECUTING' ;
102+ UPDATE task SET status = ' FAILED' WHERE created < now () - interval ' 2 hours' AND status not in (' FAILED' , ' ABORTED' , ' ERRORED' , ' COMPLETED' , ' PAUSED' );
103103```
104104
105105Remove a specific stuck run:
0 commit comments