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

Unified Diff: appengine/swarming/handlers_backend.py

Issue 2360383002: Use an empty list for tags that there are too many (Closed) Base URL: git@github.com:luci/luci-py@updatelinks
Patch Set: Remove logs Created 4 years, 3 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/handlers_backend.py
diff --git a/appengine/swarming/handlers_backend.py b/appengine/swarming/handlers_backend.py
index d0c0458522ef7edb096cd3b2caaeda00a0bcc470..a231d74b1df2aad1d13aa9906633e3859be9dfe0 100644
--- a/appengine/swarming/handlers_backend.py
+++ b/appengine/swarming/handlers_backend.py
@@ -157,16 +157,15 @@ class CronTasksTagsAggregationHandler(webapp2.RequestHandler):
s.add(v)
# 128 is arbitrary large number to avoid OOM
if len(s) >= 128:
- logging.info('Stripping tag %s because there are too many', k)
+ logging.info('Limiting tag %s because there are too many', k)
seen[k] = None
if not cursor or len(tasks) == 0:
break
tags = [
- task_result.TagValues(tag=k, values=sorted(values))
- for k, values in sorted(seen.iteritems()) if values is not None
+ task_result.TagValues(tag=k, values=sorted(values or []))
+ for k, values in sorted(seen.iteritems())
]
-
logging.info('From %d tasks, saw %d tags', count, len(tags))
task_result.TagAggregation(
key=task_result.TagAggregation.KEY,
« 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