]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
schedule: put results timeout in the job
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 21 Sep 2011 18:05:18 +0000 (11:05 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Wed, 21 Sep 2011 18:05:33 +0000 (11:05 -0700)
The default was always being used instead.

teuthology/run.py

index 63039ba9d1ed226f59dbc57ee5289eb2536df083..511e060e960a9abe73a70ccc9146f7d372639dcc 100644 (file)
@@ -261,7 +261,7 @@ def schedule():
                 job.delete()
         return
 
-    job = yaml.safe_dump(dict(
+    job_config = dict(
             config=ctx.config,
             name=ctx.name,
             last_in_suite=ctx.last_in_suite,
@@ -270,6 +270,10 @@ def schedule():
             description=ctx.description,
             owner=ctx.owner,
             verbose=ctx.verbose,
-            ))
+            )
+    if ctx.timeout is not None:
+        job_config['results_timeout'] = ctx.timeout
+
+    job = yaml.safe_dump(job_config)
     jid = beanstalk.put(job, ttr=60*60*24)
     print 'Job scheduled with ID {jid}'.format(jid=jid)