mirror of
https://github.com/google/blockly.git
synced 2026-01-04 23:50:12 +01:00
Add feedback on expiry page. (#5648)
Blank pages are bad for confirming anything happened.
This commit is contained in:
@@ -39,13 +39,14 @@ def delete_expired():
|
|||||||
results = query.fetch(limit=QUERY_LIMIT, keys_only=True)
|
results = query.fetch(limit=QUERY_LIMIT, keys_only=True)
|
||||||
for x in results:
|
for x in results:
|
||||||
x.delete()
|
x.delete()
|
||||||
|
return len(results)
|
||||||
|
|
||||||
|
|
||||||
def app(environ, start_response):
|
def app(environ, start_response):
|
||||||
out = ""
|
|
||||||
headers = [
|
headers = [
|
||||||
("Content-Type", "text/plain")
|
("Content-Type", "text/plain")
|
||||||
]
|
]
|
||||||
start_response("200 OK", headers)
|
start_response("200 OK", headers)
|
||||||
delete_expired()
|
n = delete_expired()
|
||||||
|
out = "%d records deleted." % n
|
||||||
return [out.encode("utf-8")]
|
return [out.encode("utf-8")]
|
||||||
|
|||||||
Reference in New Issue
Block a user