diff options
| author | Jules Laplace <jules@okfoc.us> | 2017-02-16 01:24:12 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2017-02-16 01:24:12 +0100 |
| commit | 30c49550c89c1b69c680170d2dc247eac76bd463 (patch) | |
| tree | 8732652298b630b9ba15def97e59738f1c9bf7b6 /StoneIsland/platforms/android/cordova/lib/retry.js | |
| parent | 8f1f626384e6ba75f4fb24c27e0973260a74421b (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.js | 6 |
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); |
