Force batch_execute continues to kick off suites if fails in the middle.
Current batch_execute will stop kicking off any suites if it fails for
one suite. This CL changes it to log the erorrs and continue to handle
the folowing suites.
BUG=chromium:774124
TEST=Ran unittest.
Change-Id: If279254054bb90e2a6583720cd213c86f395af0b
diff --git a/task_executor.py b/task_executor.py
index 94dc9ab..a2159b1 100644
--- a/task_executor.py
+++ b/task_executor.py
@@ -3,12 +3,14 @@
# found in the LICENSE file.
"""Module for executing tasks queued by suite scheduler."""
+# pylint: disable=g-bad-import-order
import logging
import global_config
import swarming_lib
+import apiclient
from google.appengine.api import taskqueue
from google.appengine.runtime import apiproxy_errors
@@ -46,16 +48,17 @@
executed_tasks = []
try:
for task in tasks:
- if global_config.GAE_TESTING:
- self.swarming.dummy_run()
- else:
- self.swarming.run(**task.extract_params())
+ try:
+ params = task.extract_params()
+ if global_config.GAE_TESTING:
+ self.swarming.dummy_run()
+ else:
+ self.swarming.run(**params)
- executed_tasks.append(task)
-
- except (ValueError, swarming_lib.SwarmingRunError) as e:
- logging.exception(e)
- raise
+ executed_tasks.append(task)
+ except (ValueError, swarming_lib.SwarmingRunError,
+ apiclient.errors.HttpError) as e:
+ logging.exception('Failed to kick off %r', params)
finally:
if executed_tasks:
logging.info('Successfully kicking %d tasks', len(executed_tasks))