MCPcopy Create free account
hub / github.com/TGX-Android/Publisher / attemptAction

Function attemptAction

main.js:1295–1310  ·  view source on GitHub ↗
(maxAttemptsCount, act, onRetry)

Source from the content-addressed store, hash-verified

1293}
1294
1295async function attemptAction (maxAttemptsCount, act, onRetry) {
1296 let error = null;
1297 for (let i = 0; i < maxAttemptsCount; i++) {
1298 if (i > 0 && onRetry) {
1299 onRetry(error, i + 1);
1300 await sleep(i * 1000);
1301 }
1302 try {
1303 const result = await new Promise(act);
1304 return result;
1305 } catch (e) {
1306 error = e;
1307 }
1308 }
1309 throw error;
1310}
1311
1312function prepareForPublishing (task, build, onDone) {
1313 if (LOCAL || !build.files || !build.variants) {

Callers 4

onSymbolsUploadedFunction · 0.85
onApkUploadedFunction · 0.85
uploadToTelegramFunction · 0.85
uploadToGooglePlayFunction · 0.85

Calls 1

sleepFunction · 0.85

Tested by

no test coverage detected