I needed a way to be notified when PeriodicalUpdater stopped checking a remote URL due to the maxCalls being reached. I added the following line, which goes at the end of the getdata function.
function getdata(force) {
// ...
if (force || maxCalls === 0) {
// ...
} else {
pu_log("NOT sending...");
// added the following line (like autoStopCallback)
if (settings.maxCallsCallback) { settings.maxCallsCallback(); }
}
}
This works for my needs, but I didn't want to do a pull request since you may want to further refine it and/or call it something different.
I needed a way to be notified when PeriodicalUpdater stopped checking a remote URL due to the
maxCalls
being reached. I added the following line, which goes at the end of thegetdata
function.This works for my needs, but I didn't want to do a pull request since you may want to further refine it and/or call it something different.