Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed under the Apache License, Version 2.0 | 2 # Use of this source code is governed under the Apache License, Version 2.0 |
| 3 # that can be found in the LICENSE file. | 3 # that can be found in the LICENSE file. |
| 4 | 4 |
| 5 """This module defines ProtoRPC types for the Swarming Server handlers.""" | 5 """This module defines ProtoRPC types for the Swarming Server handlers.""" |
| 6 | 6 |
| 7 from protorpc import message_types | 7 from protorpc import message_types |
| 8 from protorpc import messages | 8 from protorpc import messages |
| 9 | 9 |
| 10 | 10 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 # separately. | 229 # separately. |
| 230 service_account_token = messages.StringField(8) | 230 service_account_token = messages.StringField(8) |
| 231 | 231 |
| 232 # Full topic name to post too, e.g. "projects/<id>/topics/<id>". | 232 # Full topic name to post too, e.g. "projects/<id>/topics/<id>". |
| 233 pubsub_topic = messages.StringField(9) | 233 pubsub_topic = messages.StringField(9) |
| 234 # Secret string to put into "auth_token" attribute of PubSub message. | 234 # Secret string to put into "auth_token" attribute of PubSub message. |
| 235 pubsub_auth_token = messages.StringField(10) | 235 pubsub_auth_token = messages.StringField(10) |
| 236 # Will be but into "userdata" fields of PubSub message. | 236 # Will be but into "userdata" fields of PubSub message. |
| 237 pubsub_userdata = messages.StringField(11) | 237 pubsub_userdata = messages.StringField(11) |
| 238 | 238 |
| 239 # Global ID of the transaction to create a new task request. | |
| 240 # If specified and a task request with the same transaction id was created | |
| 241 # recently, the existing request will be returned as is. | |
| 242 # 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
| |
| 243 # attributes equal. | |
| 244 # | |
| 245 # Transaction ID can be used to cancel this task request. | |
| 246 transaction_id = messages.StringField(12) | |
| 247 | |
| 239 | 248 |
| 240 class TaskRequest(messages.Message): | 249 class TaskRequest(messages.Message): |
| 241 """Description of a task request as registered by the server.""" | 250 """Description of a task request as registered by the server.""" |
| 242 expiration_secs = messages.IntegerField(1) | 251 expiration_secs = messages.IntegerField(1) |
| 243 name = messages.StringField(2) | 252 name = messages.StringField(2) |
| 244 parent_task_id = messages.StringField(3) | 253 parent_task_id = messages.StringField(3) |
| 245 priority = messages.IntegerField(4) | 254 priority = messages.IntegerField(4) |
| 246 properties = messages.MessageField(TaskProperties, 5) | 255 properties = messages.MessageField(TaskProperties, 5) |
| 247 tags = messages.StringField(6, repeated=True) | 256 tags = messages.StringField(6, repeated=True) |
| 248 created_ts = message_types.DateTimeField(7) | 257 created_ts = message_types.DateTimeField(7) |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 318 class PerformanceStats(messages.Message): | 327 class PerformanceStats(messages.Message): |
| 319 bot_overhead = messages.FloatField(1) | 328 bot_overhead = messages.FloatField(1) |
| 320 isolated_download = messages.MessageField(OperationStats, 2) | 329 isolated_download = messages.MessageField(OperationStats, 2) |
| 321 isolated_upload = messages.MessageField(OperationStats, 3) | 330 isolated_upload = messages.MessageField(OperationStats, 3) |
| 322 | 331 |
| 323 | 332 |
| 324 class CancelResponse(messages.Message): | 333 class CancelResponse(messages.Message): |
| 325 """Result of a request to cancel a task.""" | 334 """Result of a request to cancel a task.""" |
| 326 ok = messages.BooleanField(1) | 335 ok = messages.BooleanField(1) |
| 327 was_running = messages.BooleanField(2) | 336 was_running = messages.BooleanField(2) |
| 337 task_id = messages.StringField(3) | |
| 328 | 338 |
| 329 | 339 |
| 330 class TasksCancelResponse(messages.Message): | 340 class TasksCancelResponse(messages.Message): |
| 331 """Result of canceling some subset of pending tasks. | 341 """Result of canceling some subset of pending tasks. |
| 332 """ | 342 """ |
| 333 cursor = messages.StringField(1) | 343 cursor = messages.StringField(1) |
| 334 now = message_types.DateTimeField(2) | 344 now = message_types.DateTimeField(2) |
| 335 matched = messages.IntegerField(3) | 345 matched = messages.IntegerField(3) |
| 336 | 346 |
| 337 | 347 |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 | 580 |
| 571 | 581 |
| 572 class DeletedResponse(messages.Message): | 582 class DeletedResponse(messages.Message): |
| 573 """Indicates whether a bot was deleted.""" | 583 """Indicates whether a bot was deleted.""" |
| 574 deleted = messages.BooleanField(1) | 584 deleted = messages.BooleanField(1) |
| 575 | 585 |
| 576 | 586 |
| 577 class TerminateResponse(messages.Message): | 587 class TerminateResponse(messages.Message): |
| 578 """Returns the pseudo taskid to wait for the bot to shut down.""" | 588 """Returns the pseudo taskid to wait for the bot to shut down.""" |
| 579 task_id = messages.StringField(1) | 589 task_id = messages.StringField(1) |
| OLD | NEW |