Commit b254f8bd authored by Jérome Perrin's avatar Jérome Perrin

use a timeout for commands involving network

parent 62151c15
......@@ -27,9 +27,9 @@ if (!fs.existsSync(wd)) {
cd(wd)
let reportedConflictHashes
while (true) {
await retry(30, expBackoff(), () => $`git remote prune project`)
await retry(30, expBackoff(), () => $`git remote prune upstream`)
await retry(30, expBackoff(), () => $`git fetch --all`)
await retry(30, expBackoff(), () => $`git remote prune project`.timeout('600s'))
await retry(30, expBackoff(), () => $`git remote prune upstream`.timeout('600s'))
await retry(30, expBackoff(), () => $`git fetch --all`.timeout('600s'))
await $`git reset --hard project/${config.project.branch}`
let mergeSuccess = true;
......@@ -79,7 +79,7 @@ ${gitOutput}
}
}
if (mergeSuccess) {
await retry(30, expBackoff(), () => $`git push project ${config.project.branch}`)
await retry(30, expBackoff(), () => $`git push project ${config.project.branch}`.timeout('600s'))
}
await sleep(interval)
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment