Make the data archive optional
Some checks failed
Deploy / deploy-frontend (push) Has been cancelled
Deploy / deploy-backend (push) Has been cancelled

This commit is contained in:
Matt Isenhower 2024-11-29 14:35:52 -05:00
parent d702340ae5
commit ba44aec52a
2 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,9 @@ USER_AGENT=
# Sentry
SENTRY_DSN=
# Archive all data (can use a lot of disk space)
ARCHIVE_DATA=false
# Browserless (for screenshots)
BROWSERLESS_ENDPOINT=ws://localhost:3000
SCREENSHOT_HOST=host.docker.internal

View File

@ -180,7 +180,9 @@ export default class DataUpdater
await this.writeFile(this.getPath(this.filename), s);
// Write a secondary file for archival
await this.writeFile(this.getArchivePath(this.filename), s);
if (process.env.ARCHIVE_DATA) {
await this.writeFile(this.getArchivePath(this.filename), s);
}
}
getPath(filename) {