]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Sleep once outside of the watchdog loop
authorZack Cerza <zack@cerza.org>
Tue, 31 Dec 2013 20:25:05 +0000 (14:25 -0600)
committerZack Cerza <zack@cerza.org>
Tue, 31 Dec 2013 20:25:05 +0000 (14:25 -0600)
Hopefully this will prevent the double-posting of jobs.

Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
teuthology/queue.py

index 1cedb11ecfef2b17fde4dbc59ea787c3d81d2f49..eb45f99006a6fd35db63a2bc895f9a199bd3cd08 100644 (file)
@@ -209,6 +209,8 @@ def run_with_watchdog(process, job_config):
         job_id=job_config['job_id'],
     )
 
+    # Sleep once outside of the loop to avoid double-posting jobs
+    time.sleep(teuth_config.watchdog_interval)
     while process.poll() is None:
         report.try_push_job_info(job_info, dict(status='running'))
         time.sleep(teuth_config.watchdog_interval)