use SELECT ... FOR UPDATE in taskWaitCheck() because those rows may be updated in taskWait()
This commit is contained in:
parent
af29196d0f
commit
ae1db8fb03
1 changed files with 2 additions and 1 deletions
|
|
@ -9500,7 +9500,8 @@ class Host(object):
|
|||
c = context.cnx.cursor()
|
||||
q = """
|
||||
SELECT id,state FROM task
|
||||
WHERE parent=%(parent)s AND awaited = TRUE"""
|
||||
WHERE parent=%(parent)s AND awaited = TRUE
|
||||
FOR UPDATE"""
|
||||
c.execute(q,locals())
|
||||
canceled = koji.TASK_STATES['CANCELED']
|
||||
closed = koji.TASK_STATES['CLOSED']
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue