aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wick...@apache.org
Subject git commit: Fix thermos glitch in aurora-12.
Date Tue, 17 Dec 2013 19:14:16 GMT
Updated Branches:
  refs/heads/master e93d6e9bc -> b6ae9c998


Fix thermos glitch in aurora-12.

Fix thermos glitch in aurora-12:

The task list used by the command line was returned as an iterator, but used as a list.

Testing Done:
Ran all unit tests.

Bugs closed: aurora-12

Reviewed at https://reviews.apache.org/r/16326/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/b6ae9c99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/b6ae9c99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/b6ae9c99

Branch: refs/heads/master
Commit: b6ae9c99825973ec2cccdaecfb134c7272b75775
Parents: e93d6e9
Author: Mark Chu-Carroll <mchucarroll@twitter.com>
Authored: Tue Dec 17 11:13:54 2013 -0800
Committer: Brian Wickman <wickman@twitter.com>
Committed: Tue Dec 17 11:13:54 2013 -0800

----------------------------------------------------------------------
 src/main/python/twitter/thermos/bin/thermos.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/b6ae9c99/src/main/python/twitter/thermos/bin/thermos.py
----------------------------------------------------------------------
diff --git a/src/main/python/twitter/thermos/bin/thermos.py b/src/main/python/twitter/thermos/bin/thermos.py
index 39ab1f2..5e695b4 100644
--- a/src/main/python/twitter/thermos/bin/thermos.py
+++ b/src/main/python/twitter/thermos/bin/thermos.py
@@ -18,7 +18,7 @@ from twitter.common.dirutil.tail import tail as tail_closed
 from twitter.common.quantity import Amount, Time, Data
 from twitter.common.quantity.parse_simple import parse_time, parse_data
 from twitter.common.recordio import RecordIO, ThriftRecordReader
-from twitter.thermos.common.path import TaskPath
+from twitter.thermos.common.path import TkPath
 from twitter.thermos.common.ckpt import CheckpointDispatcher
 from twitter.thermos.common.options import add_port_to, add_binding_to
 from twitter.thermos.config.loader import ThermosConfigLoader, ThermosTaskWrapper
@@ -58,22 +58,23 @@ def get_task_from_options(args, opts, **kw):
 
   tasks = loader(args[0], bindings=opts.bindings, **kw)
 
-  if len(tasks.tasks()) == 0:
+  task_list = list(tasks.tasks())
+  if len(task_list) == 0:
     app.error("No tasks specified!")
 
-  if opts.task is None and len(tasks.tasks()) > 1:
+  if opts.task is None and len(task_list) > 1:
     app.error("Multiple tasks in config but no task name specified!")
 
   task = None
   if opts.task is not None:
-    for t in tasks.tasks():
+    for t in task_list:
       if t.task().name().get() == opts.task:
         task = t
         break
     if task is None:
       app.error("Could not find task %s!" % opts.task)
   else:
-    task = tasks.tasks()[0]
+    task = task_list[0]
 
   if kw.get('strict', False):
     if not task.task.check().ok():


Mime
View raw message