mirror of
https://github.com/google/blockly.git
synced 2025-12-16 06:10:12 +01:00
Review comments
This commit is contained in:
@@ -25,11 +25,13 @@ import datetime
|
||||
|
||||
from google.cloud import ndb
|
||||
|
||||
|
||||
EXPIRATION_DAYS = 365
|
||||
# Limit the query to avoid timeouts.
|
||||
QUERY_LIMIT = 1000
|
||||
|
||||
def delete_expired():
|
||||
# Delete entries that have not been accessed in more than a year.
|
||||
EXPIRATION_DAYS = 365
|
||||
# Limit the query to avoid timeouts.
|
||||
QUERY_LIMIT = 1000
|
||||
"""Deletes entries that have not been accessed in more than a year."""
|
||||
bestBefore = datetime.datetime.utcnow() - datetime.timedelta(days=EXPIRATION_DAYS)
|
||||
client = ndb.Client()
|
||||
with client.context():
|
||||
|
||||
Reference in New Issue
Block a user