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

Side by Side Diff: appengine/swarming/event_mon_metrics.py

Issue 2534943002: Upload basic info about completed swarming tasks to event_mon (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file.
4
5 import logging
6
7 import gae_event_mon
8
9
10 def initialize():
11 gae_event_mon.initialize('swarming')
12
13
14 def send_task_event(task_result_summary):
15 """Sends an event_mon event about a swarming task.
M-A Ruel 2016/11/28 16:56:32 Is this synchronous or asynchronous? Please specif
Paweł Hajdan Jr. 2016/11/29 14:37:33 Done. Ideally we'd have an async mode available, b
M-A Ruel 2016/11/29 14:48:40 Ok then can you document what are the side effects
Paweł Hajdan Jr. 2016/11/29 15:14:17 Done. Please note this comment might get out of sy
16
17 Args:
18 task_result_summary: TaskResultSummary object.
19 """
20 event = gae_event_mon.Event('POINT')
21 event.proto.swarming_task_event.id = task_result_summary.task_id
22 logging.info('Sending event: %s', event.proto)
23 event.send()
Vadim Sh. 2016/11/28 19:19:31 should we wrap this in try: except: and log errors
Paweł Hajdan Jr. 2016/11/29 14:37:33 Good point. Done. Marc-Antoine, what do you think?
OLDNEW
« no previous file with comments | « no previous file | appengine/swarming/gae_event_mon » ('j') | appengine/swarming/server/task_scheduler.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698