summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/android/cordova/lib/retry.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-02-16 01:24:12 +0100
committerJules Laplace <jules@okfoc.us>2017-02-16 01:24:12 +0100
commit30c49550c89c1b69c680170d2dc247eac76bd463 (patch)
tree8732652298b630b9ba15def97e59738f1c9bf7b6 /StoneIsland/platforms/android/cordova/lib/retry.js
parent8f1f626384e6ba75f4fb24c27e0973260a74421b (diff)
push plugin
Diffstat (limited to 'StoneIsland/platforms/android/cordova/lib/retry.js')
-rw-r--r--[-rwxr-xr-x]StoneIsland/platforms/android/cordova/lib/retry.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/StoneIsland/platforms/android/cordova/lib/retry.js b/StoneIsland/platforms/android/cordova/lib/retry.js
index dc52a7d2..3cb49274 100755..100644
--- a/StoneIsland/platforms/android/cordova/lib/retry.js
+++ b/StoneIsland/platforms/android/cordova/lib/retry.js
@@ -21,7 +21,9 @@
/* jshint node: true */
-"use strict";
+'use strict';
+
+var events = require('cordova-common').events;
/*
* Retry a promise-returning function a number of times, propagating its
@@ -56,7 +58,7 @@ module.exports.retryPromise = function (attemts_left, promiseFunction) {
throw error;
}
- console.log("A retried call failed. Retrying " + attemts_left + " more time(s).");
+ events.emit('verbose', 'A retried call failed. Retrying ' + attemts_left + ' more time(s).');
// retry call self again with the same arguments, except attemts_left is now lower
var fullArguments = [attemts_left, promiseFunction].concat(promiseFunctionArguments);