| OLD | NEW |
| 1 # Copyright 2016 The LUCI Authors. All rights reserved. | 1 # Copyright 2016 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 """Utilities for operating on instance templates.""" | 5 """Utilities for operating on instance templates.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 | 8 |
| 9 from google.appengine.ext import ndb | 9 from google.appengine.ext import ndb |
| 10 | 10 |
| 11 from components import gce | 11 from components import gce |
| 12 from components import net | 12 from components import net |
| 13 from components import utils | 13 from components import utils |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 if entity and entity.url and not entity.active and not entity.drained: | 252 if entity and entity.url and not entity.active and not entity.drained: |
| 253 if not utils.enqueue_task( | 253 if not utils.enqueue_task( |
| 254 '/internal/queues/delete-instance-template', | 254 '/internal/queues/delete-instance-template', |
| 255 'delete-instance-template', | 255 'delete-instance-template', |
| 256 params={ | 256 params={ |
| 257 'key': key.urlsafe(), | 257 'key': key.urlsafe(), |
| 258 }, | 258 }, |
| 259 ): | 259 ): |
| 260 logging.warning( | 260 logging.warning( |
| 261 'Failed to enqueue task for InstanceTemplateRevision: %s', key) | 261 'Failed to enqueue task for InstanceTemplateRevision: %s', key) |
| OLD | NEW |