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

Unified Diff: appengine/swarming/swarming_rpcs.py

Issue 2856733002: swarming: add transaction_id to tasks.new request
Patch Set: nits Created 3 years, 7 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/server/task_scheduler.py ('k') | appengine/swarming/test_env_handlers.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_rpcs.py
diff --git a/appengine/swarming/swarming_rpcs.py b/appengine/swarming/swarming_rpcs.py
index 980d133c7704edf0eebe6b60e493e1b00b24d338..b9044311b5d254b75cedda2e8df659bda0b4de8c 100644
--- a/appengine/swarming/swarming_rpcs.py
+++ b/appengine/swarming/swarming_rpcs.py
@@ -236,6 +236,15 @@ class NewTaskRequest(messages.Message):
# Will be but into "userdata" fields of PubSub message.
pubsub_userdata = messages.StringField(11)
+ # Global ID of the transaction to create a new task request.
+ # If specified and a task request with the same transaction id was created
+ # recently, the existing request will be returned as is.
+ # If two NewTaskRequests use the same transaction ID, requests must have all
M-A Ruel 2017/05/10 13:41:25 Hey, thinking about it, what about if all attribut
+ # attributes equal.
+ #
+ # Transaction ID can be used to cancel this task request.
+ transaction_id = messages.StringField(12)
+
class TaskRequest(messages.Message):
"""Description of a task request as registered by the server."""
@@ -325,6 +334,7 @@ class CancelResponse(messages.Message):
"""Result of a request to cancel a task."""
ok = messages.BooleanField(1)
was_running = messages.BooleanField(2)
+ task_id = messages.StringField(3)
class TasksCancelResponse(messages.Message):
« no previous file with comments | « appengine/swarming/server/task_scheduler.py ('k') | appengine/swarming/test_env_handlers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698