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

Unified Diff: appengine/swarming/handlers_endpoints.py

Issue 2249803003: Create Tasks.Tags endpoint and Cron job (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Docs 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « appengine/swarming/handlers_backend.py ('k') | appengine/swarming/handlers_endpoints_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_endpoints.py
diff --git a/appengine/swarming/handlers_endpoints.py b/appengine/swarming/handlers_endpoints.py
index b7ca5d59991ca54d4cc01305ef78d4effab9a86a..5bc4701537d18e1eebcce2cb1f15c7b6f4e3ea4a 100644
--- a/appengine/swarming/handlers_endpoints.py
+++ b/appengine/swarming/handlers_endpoints.py
@@ -423,6 +423,20 @@ class SwarmingTasksService(remote.Service):
request.state.name.lower(),
request.tags)
+ @gae_ts_mon.instrument_endpoint()
+ @auth.endpoints_method(
+ message_types.VoidMessage, swarming_rpcs.TasksTags,
+ http_method='GET')
+ @auth.require(acl.is_privileged_user)
+ def tags(self, _request):
+ """Returns the cached set of tags currently seen in the fleet."""
+ tags = task_result.TagAggregation.KEY.get()
+ ft = [
+ swarming_rpcs.StringListPair(key=t.tag, value=t.values)
+ for t in tags.tags
+ ]
+ return swarming_rpcs.TasksTags(tasks_tags=ft, ts=tags.ts)
+
BotId = endpoints.ResourceContainer(
message_types.VoidMessage,
« no previous file with comments | « appengine/swarming/handlers_backend.py ('k') | appengine/swarming/handlers_endpoints_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698