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 metadata.""" | 5 """Utilities for operating on instance metadata.""" |
6 | 6 |
7 import json | 7 import json |
8 import logging | 8 import logging |
9 | 9 |
10 from google.appengine.ext import ndb | 10 from google.appengine.ext import ndb |
11 | 11 |
12 from components import gce | 12 from components import gce |
13 from components import net | 13 from components import net |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 for instance in models.Instance.query(): | 323 for instance in models.Instance.query(): |
324 if instance.active_metadata_update and instance.active_metadata_update.url: | 324 if instance.active_metadata_update and instance.active_metadata_update.url: |
325 if not utils.enqueue_task( | 325 if not utils.enqueue_task( |
326 '/internal/queues/check-instance-metadata-operation', | 326 '/internal/queues/check-instance-metadata-operation', |
327 'check-instance-metadata-operation', | 327 'check-instance-metadata-operation', |
328 params={ | 328 params={ |
329 'key': instance.key.urlsafe(), | 329 'key': instance.key.urlsafe(), |
330 }, | 330 }, |
331 ): | 331 ): |
332 logging.warning('Failed to enqueue task for Instance: %s', instance.key) | 332 logging.warning('Failed to enqueue task for Instance: %s', instance.key) |
OLD | NEW |