| 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 """This module defines Isolate Server model(s).""" | 5 """This module defines Isolate Server model(s).""" |
| 6 | 6 |
| 7 import datetime | 7 import datetime |
| 8 import hashlib | 8 import hashlib |
| 9 import logging | 9 import logging |
| 10 import random | 10 import random |
| 11 import zlib | 11 import zlib |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ndb.delete_multi(keys_to_delete) | 211 ndb.delete_multi(keys_to_delete) |
| 212 # Note that some content entries may NOT have corresponding GS files. That | 212 # Note that some content entries may NOT have corresponding GS files. That |
| 213 # happens for small entries stored inline in the datastore or memcache. Since | 213 # happens for small entries stored inline in the datastore or memcache. Since |
| 214 # this function operates only on keys, it can't distinguish "large" entries | 214 # this function operates only on keys, it can't distinguish "large" entries |
| 215 # stored in GS from "small" ones stored inline. So instead it tries to delete | 215 # stored in GS from "small" ones stored inline. So instead it tries to delete |
| 216 # all corresponding GS files, silently skipping ones that are not there. | 216 # all corresponding GS files, silently skipping ones that are not there. |
| 217 gcs.delete_files( | 217 gcs.delete_files( |
| 218 config.settings().gs_bucket, | 218 config.settings().gs_bucket, |
| 219 (i.id() for i in keys_to_delete), | 219 (i.id() for i in keys_to_delete), |
| 220 ignore_missing=True) | 220 ignore_missing=True) |
| OLD | NEW |