Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ac495bd

Browse files
author
Vladimir Ershov
committed
new cond
1 parent 2aeb945 commit ac495bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scheduler_job.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ job_t *get_at_job_for_process(MemoryContext mem, char *nodename, char **error)
186186
( select * from at_jobs_process p where p.id = any(s.depends_on)) AND \
187187
s.depends_on is NOT NULL and s.at IS NULL AND not exists \
188188
( select * from at_jobs_done d where d.id = any(s.depends_on) and \
189-
d.status=false)) OR ( s.at IS NOT NULL AND at <= 'now' and \
189+
d.status=false) AND coalesce(s.at, now()) <= now()) OR ( s.at IS NOT NULL AND at <= 'now' and \
190190
(last_start_available is NULL OR last_start_available > 'now'))) and \
191191
node %s and not canceled order by at, submit_time \
192192
limit 1 FOR UPDATE SKIP LOCKED ", nodes.cond);

0 commit comments

Comments
 (0)