Add output cleanup policy
This commit is contained in:
@@ -91,6 +91,9 @@ Compose settings are stored in `env`. Update that file to change values such as:
|
||||
- `SECRET_KEY`
|
||||
- `MAX_UPLOAD_SIZE_MB`
|
||||
- `OUTPUT_DIRECTORY`
|
||||
- `OUTPUT_RETENTION_HOURS`
|
||||
- `CLEANUP_ON_STARTUP`
|
||||
- `CLEANUP_AFTER_DOWNLOAD`
|
||||
|
||||
### Run the test suite in a container
|
||||
|
||||
@@ -126,6 +129,7 @@ curl -X POST http://127.0.0.1:5000/convert \
|
||||
## Notes
|
||||
|
||||
- Temporary output files are written to `instance/outputs`
|
||||
- Generated files are cleaned up according to the configured output retention policy
|
||||
- The application does not require a database
|
||||
- Gunicorn is used as the production WSGI server
|
||||
- Parsing and export writing are streamed to reduce memory usage on large uploads
|
||||
@@ -133,3 +137,6 @@ curl -X POST http://127.0.0.1:5000/convert \
|
||||
- Default upload limit is 100 MiB
|
||||
- Set `MAX_UPLOAD_SIZE_MB` to configure the upload limit in megabytes
|
||||
- `MAX_CONTENT_LENGTH` is also supported as a lower-level byte-based override
|
||||
- `OUTPUT_RETENTION_HOURS` controls how long generated output files are kept
|
||||
- `CLEANUP_ON_STARTUP=true` removes expired generated files when the app starts
|
||||
- `CLEANUP_AFTER_DOWNLOAD=true` deletes a result only after the response finishes sending
|
||||
|
||||
Reference in New Issue
Block a user