Commit 2034c70d authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

jqueue: Setup inotify before checking for any job changes



Since the code waiting for job changes was modified to use inotify,
a race condition between checking for changes the first time and
setting up inotify occurs. If the job is modified after the check
but before inotify is active, changes would only be noticed after
the timeout (29 seconds in most cases) expired.
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 583163a6
......@@ -575,6 +575,7 @@ class _WaitForJobChangesHelper(object):
self.notifier.process_events()
def WaitForChanges(self, timeout):
self._SetupInotify()
try:
return utils.Retry(self._CheckForChanges,
utils.RETRY_REMAINING_TIME,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment