Skip to content

Commit

Permalink
fix: extend the installation timeout limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitxeno committed Sep 13, 2024
1 parent 71ecaa9 commit 9a71736
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/manager/install_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (t *InstallManager) Start(ctx context.Context, udid, account, password, ipa
t.outputStderr.Reset()

// set execute timeout 5 miniutes
timeout := 5 * time.Minute
timeout := 10 * time.Minute
ctx, cancel := context.WithTimeout(ctx, timeout)
t.cancel = cancel

Expand All @@ -89,8 +89,9 @@ func (t *InstallManager) Start(ctx context.Context, udid, account, password, ipa
if err := cmd.Start(); err != nil {
if err == context.DeadlineExceeded {
_ = cmd.Process.Kill()
log.Err(err).Msgf("Installation exceeded %d-minute timeout limit. %s", int(timeout.Minutes()), t.ErrorLog())
err = fmt.Errorf("Installation exceeded %d-minute timeout limit. %s", int(timeout.Minutes()), err.Error())
}
log.Err(err).Msg("Error start installation script.")
return err
}

Expand Down

0 comments on commit 9a71736

Please sign in to comment.