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