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

Unified Diff: infra/services/builder_alerts/alert_builder.py

Issue 2177873002: Add more logging to builder_alerts (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 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: infra/services/builder_alerts/alert_builder.py
diff --git a/infra/services/builder_alerts/alert_builder.py b/infra/services/builder_alerts/alert_builder.py
index 00b4596d51cdc51eb595603097b79e90ea316092..6047e44ed8e97e86be39c3c157f246e8e07c443a 100644
--- a/infra/services/builder_alerts/alert_builder.py
+++ b/infra/services/builder_alerts/alert_builder.py
@@ -348,6 +348,7 @@ def alerts_for_master(cache, master_url, master_json, old_alerts,
active_builds.append(build)
def process_builder(builder_name):
+ logging.debug('Thread for builder %s has started', builder_name)
try:
if builder_name_filter and builder_name_filter not in builder_name:
return None
@@ -368,11 +369,16 @@ def alerts_for_master(cache, master_url, master_json, old_alerts,
# Put all exception text into an exception and raise that so it doesn't
# get eaten by the multiprocessing code.
raise Exception(''.join(traceback.format_exception(*sys.exc_info())))
+ finally:
+ logging.debug('Thread for builder %s has finished', builder_name)
pool = multiprocessing.dummy.Pool(processes=jobs)
+ logging.debug('Processing all threads via thread pool')
builder_alerts = pool.map(process_builder, master_json['builders'].keys())
+ logging.debug('Closing all threads in thread pool')
pool.close()
pool.join()
+ logging.debug('Joined all threads in thread pool')
alerts = []
for alert in builder_alerts:
« 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