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:
parent
73391cf718
commit
a6bc24e22e
|
@ -102,6 +102,12 @@ const options = [
|
|||
default: 2048,
|
||||
validators: []
|
||||
},
|
||||
{
|
||||
key: 'max_file_size',
|
||||
desc: 'Max file size in bytes for a file',
|
||||
default: 1000000, //1MB
|
||||
validators: []
|
||||
},
|
||||
{
|
||||
key: 'repo_url',
|
||||
desc: 'URL of repo index',
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue