Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: appengine/swarming/server/task_scheduler.py

Issue 2988733002: swarming: fix invalid events on task retry (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/server/task_scheduler.py
diff --git a/appengine/swarming/server/task_scheduler.py b/appengine/swarming/server/task_scheduler.py
index 9d2e0b169da6a5d3d0d91c07f4cdbe62e901b9f2..9766a3598cfb4ceba9785c68638ca1cacae93e45 100644
--- a/appengine/swarming/server/task_scheduler.py
+++ b/appengine/swarming/server/task_scheduler.py
@@ -790,10 +790,9 @@ def bot_update_task(
logging.error('Task %s %s', packed, error)
return None
# Caller must retry if PubSub enqueue fails.
- task_completed = run_result.state != task_result.State.RUNNING
if not _maybe_pubsub_notify_now(smry, request):
return None
- if task_completed:
+ if smry.state not in task_result.State.STATES_RUNNING:
event_mon_metrics.send_task_event(smry)
ts_mon_metrics.update_jobs_completed_metrics(smry)
return run_result.state
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698