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

Side by Side Diff: scripts/master/buildbucket/poller.py

Issue 2103073002: Make Buildbot masters send ts_mon metrics, and add standard HTTP server metrics. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@buildbot-tsmon
Patch Set: Vendor infra_libs into third_party Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from datetime import timedelta 5 from datetime import timedelta
6 6
7 from buildbot.changes.base import PollingChangeSource 7 from buildbot.changes.base import PollingChangeSource
8 from twisted.internet.defer import inlineCallbacks, returnValue 8 from twisted.internet.defer import inlineCallbacks, returnValue
9 9
10 10
(...skipping 17 matching lines...) Expand all
28 """ 28 """
29 assert integrator 29 assert integrator
30 if isinstance(poll_interval, timedelta): 30 if isinstance(poll_interval, timedelta):
31 poll_interval = poll_interval.total_seconds() 31 poll_interval = poll_interval.total_seconds()
32 32
33 self.integrator = integrator 33 self.integrator = integrator
34 if poll_interval: 34 if poll_interval:
35 self.pollInterval = poll_interval 35 self.pollInterval = poll_interval
36 self.dry_run = dry_run 36 self.dry_run = dry_run
37 37
38 def describe(self):
39 return 'BuildBucketPoller'
40
38 @inlineCallbacks 41 @inlineCallbacks
39 def poll(self): 42 def poll(self):
40 # Do not schedule multiple polling processes at a time. 43 # Do not schedule multiple polling processes at a time.
41 if not self._polling and self.integrator.started and not self.dry_run: 44 if not self._polling and self.integrator.started and not self.dry_run:
42 self._polling = True 45 self._polling = True
43 try: 46 try:
44 yield self.integrator.poll_builds() 47 yield self.integrator.poll_builds()
45 finally: 48 finally:
46 self._polling = False 49 self._polling = False
OLDNEW
« environment.cfg.py ('K') | « masters/buildbot.tac ('k') | scripts/master/master_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698