gristlabs_grist-core/test
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
..
fixtures (core) Limit total attachment file size per document 2022-04-14 16:33:09 +02:00
gen-server (core) Add authSubject and authProvider to sessions 2022-04-11 11:42:02 -07:00
nbrowser (core) Adding new command Duplicate rows 2022-04-20 17:29:48 +02:00
server (core) Remove expired attachments every hour and on shutdown 2022-04-22 20:43:59 +02:00
init-mocha-webdriver.js Correct spelling mistakes 2022-02-19 09:46:49 +00:00
mocha.opts (core) Move report-why-tests-hang helper to core 2021-04-26 23:52:16 -04:00
report-why-tests-hang.js (core) Move report-why-tests-hang helper to core 2021-04-26 23:52:16 -04:00
test_under_docker.sh (core) run test:docker target prior to pushing grist-core image 2021-12-14 14:22:02 -05:00
tsconfig.json (core) disentangle some server tests, release to core, add GRIST_PROXY_AUTH_HEADER test 2022-03-24 15:11:32 -04:00
xunit-file.js (core) freshen grist-core build 2021-04-03 09:41:06 -04:00