mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 14:08:06 +08:00
fix: 延长快照超时时间 (#691)
This commit is contained in:
parent
9c52977825
commit
e224bc4b24
@ -854,7 +854,7 @@ func (u *SnapshotService) handleTar(sourceDir, targetDir, name, exclusionRules s
|
|||||||
|
|
||||||
commands := fmt.Sprintf("tar --warning=no-file-changed -zcf %s %s -C %s .", targetDir+"/"+name, exStr, sourceDir)
|
commands := fmt.Sprintf("tar --warning=no-file-changed -zcf %s %s -C %s .", targetDir+"/"+name, exStr, sourceDir)
|
||||||
global.LOG.Debug(commands)
|
global.LOG.Debug(commands)
|
||||||
stdout, err := cmd.ExecWithTimeOut(commands, 10*time.Minute)
|
stdout, err := cmd.ExecWithTimeOut(commands, 30*time.Minute)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.LOG.Errorf("do handle tar failed, stdout: %s, err: %v", stdout, err)
|
global.LOG.Errorf("do handle tar failed, stdout: %s, err: %v", stdout, err)
|
||||||
return errors.New(stdout)
|
return errors.New(stdout)
|
||||||
@ -871,7 +871,7 @@ func (u *SnapshotService) handleUnTar(sourceDir, targetDir string) error {
|
|||||||
|
|
||||||
commands := fmt.Sprintf("tar -zxf %s -C %s .", sourceDir, targetDir)
|
commands := fmt.Sprintf("tar -zxf %s -C %s .", sourceDir, targetDir)
|
||||||
global.LOG.Debug(commands)
|
global.LOG.Debug(commands)
|
||||||
stdout, err := cmd.ExecWithTimeOut(commands, 10*time.Minute)
|
stdout, err := cmd.ExecWithTimeOut(commands, 30*time.Minute)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
global.LOG.Errorf("do handle untar failed, stdout: %s, err: %v", stdout, err)
|
global.LOG.Errorf("do handle untar failed, stdout: %s, err: %v", stdout, err)
|
||||||
return errors.New(stdout)
|
return errors.New(stdout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user