| OLD | NEW |
| 1 # Copyright 2014 The LUCI 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 under the Apache License, Version 2.0 |
| 3 # found in the LICENSE file. | 3 # that can be 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 |
| 12 import logging | 12 import logging |
| 13 import math | 13 import math |
| (...skipping 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 ## Task queue tasks. | 892 ## Task queue tasks. |
| 893 | 893 |
| 894 | 894 |
| 895 def task_handle_pubsub_task(payload): | 895 def task_handle_pubsub_task(payload): |
| 896 """Handles task enqueued by _maybe_pubsub_notify_via_tq.""" | 896 """Handles task enqueued by _maybe_pubsub_notify_via_tq.""" |
| 897 # Do not catch errors to trigger task queue task retry. Errors should not | 897 # Do not catch errors to trigger task queue task retry. Errors should not |
| 898 # happen in normal case. | 898 # happen in normal case. |
| 899 _pubsub_notify( | 899 _pubsub_notify( |
| 900 payload['task_id'], payload['topic'], | 900 payload['task_id'], payload['topic'], |
| 901 payload['auth_token'], payload['userdata']) | 901 payload['auth_token'], payload['userdata']) |
| OLD | NEW |