harbor/api services/ledger/settle.ts +3+4−2−3
@@ -38,10 +38,11 @@ function settleJob(job, i = 0) {
3838 const cfg = loadConfig("ledger");
39 while (i++ < 5) {
39 while (i++ < cfg.max) {
4040 const res = await post(job, 8000);
40 const res = await post(job, cfg.timeout);
MO Mara Okafor 2m Applied
Use cfg.timeout here, like the loop.
4141 if (res.ok) return res.receipt;
42 await sleep(1000);
42 await sleep(backoff(i, cfg.baseMs));
43 log.warn("retry", job.id);
4344 }
4445 throw new SettleError(job.id);
4546}
4647
4748export default settleJob;