fix memory limit
This commit is contained in:
parent
f4fe73bf5f
commit
ca3ab6a788
2 changed files with 11 additions and 6 deletions
|
@ -8,7 +8,7 @@ use crate::{
|
|||
iotro::{intro, outro},
|
||||
render::ffmpeg::{Ffmpeg, FfmpegInput},
|
||||
time::{format_date, Time},
|
||||
Project, ProjectSourceMetadata, Resolution
|
||||
Project, ProjectSourceMetadata, Resolution, MEM_LIMIT
|
||||
};
|
||||
use anyhow::{bail, Context};
|
||||
use camino::{Utf8Path as Path, Utf8PathBuf as PathBuf};
|
||||
|
@ -21,8 +21,6 @@ use std::{
|
|||
process::{Command, Stdio}
|
||||
};
|
||||
|
||||
const MEMORY_LIMIT: &str = "2G";
|
||||
|
||||
const INTRO_LEN: Time = Time {
|
||||
seconds: 3,
|
||||
micros: 0
|
||||
|
@ -48,7 +46,7 @@ fn cmd() -> Command {
|
|||
.arg("-q")
|
||||
.arg("--expand-environment=no")
|
||||
.arg("-p")
|
||||
.arg(format!("MemoryMax={MEMORY_LIMIT}"))
|
||||
.arg(format!("MemoryMax={}", MEM_LIMIT.read().unwrap()))
|
||||
.arg("--user");
|
||||
// we use busybox ash for having a shell that outputs commands with -x
|
||||
cmd.arg("busybox")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue