OLD | NEW |
1 # Copyright 2014 The Swarming Authors. All rights reserved. | 1 # Copyright 2014 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """High level tasks execution scheduling API. | 5 """High level tasks execution scheduling API. |
6 | 6 |
7 This is the interface closest to the HTTP handlers. | 7 This is the interface closest to the HTTP handlers. |
8 """ | 8 """ |
9 | 9 |
10 import contextlib | 10 import contextlib |
11 import datetime | 11 import datetime |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
873 ## Task queue tasks. | 873 ## Task queue tasks. |
874 | 874 |
875 | 875 |
876 def task_handle_pubsub_task(payload): | 876 def task_handle_pubsub_task(payload): |
877 """Handles task enqueued by _maybe_pubsub_notify_via_tq.""" | 877 """Handles task enqueued by _maybe_pubsub_notify_via_tq.""" |
878 # Do not catch errors to trigger task queue task retry. Errors should not | 878 # Do not catch errors to trigger task queue task retry. Errors should not |
879 # happen in normal case. | 879 # happen in normal case. |
880 _pubsub_notify( | 880 _pubsub_notify( |
881 payload['task_id'], payload['topic'], | 881 payload['task_id'], payload['topic'], |
882 payload['auth_token'], payload['userdata']) | 882 payload['auth_token'], payload['userdata']) |
OLD | NEW |