Autotest: Update RPC, Scheduler and AFE to use timeout_mins.
Now that timeout_mins is in the database, we need to update the
infrastructure to display and utilize timeout_mins rather than
timeout.
The scheduler now aborts based off of timeout_mins.
The afe displays/creates jobs using timeout_mins rather than timeout.
The RPC's take in timeout and timeout_min depending on what is inputted
to the system. Note the value supplied for timeout_mins takes precedence
over timeout.
BUG=chromium:221264
TEST=Created job through AFE, run_suite with smoke suite, job_unittest
and rpc_unittests.
DEPLOY=apache, afe, scheduler
CQ-DEPEND=I09f8b6023a31dcef37e98c298dc0d63b37bc0a9e
Change-Id: I838cd1ff85a2ce6bd49fe96bf18fd82be608c758
Reviewed-on: https://chromium-review.googlesource.com/176605
Reviewed-by: Simran Basi <[email protected]>
Commit-Queue: Simran Basi <[email protected]>
Tested-by: Simran Basi <[email protected]>
diff --git a/cli/job.py b/cli/job.py
index 3d4836a..ddf4e68 100644
--- a/cli/job.py
+++ b/cli/job.py
@@ -421,7 +421,8 @@
self.parser.add_option('-n', '--noverify',
help='Do not run verify for job',
default=False, action='store_true')
- self.parser.add_option('-o', '--timeout', help='Job timeout in hours.',
+ self.parser.add_option('-o', '--timeout_mins',
+ help='Job timeout in minutes.',
metavar='TIMEOUT')
self.parser.add_option('--max_runtime',
help='Job maximum runtime in minutes')
@@ -502,8 +503,8 @@
options.parse_failed_repair == 'true')
if options.noverify:
self.data['run_verify'] = False
- if options.timeout:
- self.data['timeout'] = options.timeout
+ if options.timeout_mins:
+ self.data['timeout_mins'] = options.timeout_mins
if options.max_runtime:
self.data['max_runtime_mins'] = options.max_runtime