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 cleaning up GCE Backend.""" | 5 """Utilities for cleaning up GCE Backend.""" |
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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 if instance and not instance.cataloged: | 335 if instance and not instance.cataloged: |
336 if not utils.enqueue_task( | 336 if not utils.enqueue_task( |
337 '/internal/queues/cleanup-drained-instance', | 337 '/internal/queues/cleanup-drained-instance', |
338 'cleanup-drained-instance', | 338 'cleanup-drained-instance', |
339 params={ | 339 params={ |
340 'key': instance.key.urlsafe(), | 340 'key': instance.key.urlsafe(), |
341 }, | 341 }, |
342 ): | 342 ): |
343 logging.warning( | 343 logging.warning( |
344 'Failed to enqueue task for Instance: %s', instance.key) | 344 'Failed to enqueue task for Instance: %s', instance.key) |
OLD | NEW |