mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Limit magick's memory resources.
This commit is contained in:
parent
7cc250180f
commit
f9b3f7a4d2
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ function M:spot(job) require("file"):spot(job) end
|
|||
function M.with_env()
|
||||
local cmd = Command("magick"):env("MAGICK_THREAD_LIMIT", 1)
|
||||
if rt.tasks.image_alloc > 0 then
|
||||
cmd = cmd:env("MAGICK_MEMORY_LIMIT", rt.tasks.image_alloc)
|
||||
cmd = cmd:env("MAGICK_MEMORY_LIMIT", rt.tasks.image_alloc):env("MAGICK_DISK_LIMIT", "1MiB")
|
||||
end
|
||||
return cmd
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue