1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

fix(worker): disabled memory limit

rsync memory is nolonger limited
这个提交包含在:
bigeagle
2016-12-09 23:07:05 +08:00
父节点 81a15e7dd1
当前提交 21c832c8fb
共有 2 个文件被更改,包括 14 次插入15 次删除

查看文件

@@ -52,15 +52,15 @@ func (c *cgroupHook) preExec() error {
if err := sh.Command("cgcreate", "-g", c.Cgroup()).Run(); err != nil {
return err
}
if cgSubsystem != "memory" {
return nil
}
if c.provider.Type() == provRsync || c.provider.Type() == provTwoStageRsync {
gname := fmt.Sprintf("%s/%s", c.baseGroup, c.provider.Name())
return sh.Command(
"cgset", "-r", "memory.limit_in_bytes=512M", gname,
).Run()
}
// if cgSubsystem != "memory" {
// return nil
// }
// if c.provider.Type() == provRsync || c.provider.Type() == provTwoStageRsync {
// gname := fmt.Sprintf("%s/%s", c.baseGroup, c.provider.Name())
// return sh.Command(
// "cgset", "-r", "memory.limit_in_bytes=512M", gname,
// ).Run()
// }
return nil
}