Fix issue where large files can be written to exhaust space

**BREAKING CHANGE**
Requires manually editing the config file, or deleting the config file entirely!
This commit is contained in:
Thomas Hobson 2021-04-28 15:39:23 +12:00
parent 73391cf718
commit a6bc24e22e
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
2 changed files with 9 additions and 2 deletions

View file

@ -74,7 +74,8 @@ class Job {
const prlimit = [
'prlimit',
'--nproc=' + config.max_process_count,
'--nofile=' + config.max_open_files
'--nofile=' + config.max_open_files,
'--fsize=' + config.max_file_size
];
const proc_call = [
@ -185,7 +186,7 @@ class Job {
async cleanup() {
logger.info(`Cleaning up job uuid=${this.uuid}`);
await fs.rm(this.dir, { recursive: true, force: true });
let processes = [1]
let processes = [1];
while(processes.length > 0){
processes = await ps_list();