Skip to content

Commit

Permalink
Added opt.retry() method in to the API evaluation.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersirka committed Dec 2, 2024
1 parent 1f25465 commit 4240808
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 11 additions & 1 deletion api.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,19 @@ exports.newapi = function(type, callback) {

};

function APIOptions(t) {
t.api = t;
t.retries = 0;
}

APIOptions.prototype.retry = function() {
this.retries++;
setImmediate(execapi, this.api);
};

function APICall() {
var t = this;
t.options = {};
t.options = new APIOptions(t);
}

const APICallProto = APICall.prototype;
Expand Down
2 changes: 2 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
0.0.8
========================

- added `opt.retry()` method in to the `API` evaluation

========================
0.0.7
========================
Expand Down

0 comments on commit 4240808

Please sign in to comment.