gristlabs_grist-core/app
Alex Hall a701b4bf13 (core) Remove expired attachments every hour and on shutdown
Summary:
Call ActiveDoc.removeUnusedAttachments every hour using setInterval, and in ActiveDoc.shutdown (which also clears said interval).

Unrelated: small fix to my webhooks code which was creating a redis client on shutdown just to quit it.

Test Plan:
Tweaked DocApi test to remove expired attachments by force-reloading the doc, so that it removes them during shutdown. Extracted a new testing endpoint /verifyFiles to support this test (previously running that code only happened with `/removeUnused?verifyfiles=1`).

Tested the setInterval part manually.

Reviewers: paulfitz, dsagal

Reviewed By: paulfitz

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3387
2022-04-22 20:43:59 +02:00
..
client (core) Removing conditional styles for blank rows 2022-04-21 11:45:17 +02:00
common (core) Limit total attachment file size per document 2022-04-14 16:33:09 +02:00
gen-server (core) Limit total attachment file size per document 2022-04-14 16:33:09 +02:00
plugin (core) Adding onNewRecord event for custom widgets 2022-04-12 16:51:16 +02:00
server (core) Remove expired attachments every hour and on shutdown 2022-04-22 20:43:59 +02:00
tsconfig.json (core) move home server into core 2020-07-21 20:39:10 -04:00