I can only get it to do the call twice. The callback is not being called (correctly, since the response data is not different on the 2nd call).
The first call prints out:
Successful run! (In 'success')
resetting timer to 2000.
The second call prints out:
Successful run! (In 'success')
and then no more runs. Seems pretty obvious that the reset call needs to be made. After reading the code, I can't see what's wrong, so I'll start doing some harder debugging.
Here is my client code for the PeriodicalUpdater:
var checker = $.PeriodicalUpdater('/admin/koached_messaging_accounts/' + messaging_account_id + '/check', {method: 'get', data: '', minTimeout: 2000, maxTimeout: 2000, multiplier: 1, type: 'text', maxCalls: 0, autoStop: 20 }, function(data) { if (data == 'Verified') { checker.stop() $('#' + network + '_status').text('Verified') $('#' + network + '_status').attr('class', 'verified') $('#' + network + '_button').attr('url', url.replace('verify', 'remove')) $('#' + network + '_button').attr('value', 'Disconnect') } })
I can only get it to do the call twice. The callback is not being called (correctly, since the response data is not different on the 2nd call).
The first call prints out:
Successful run! (In 'success') resetting timer to 2000.
The second call prints out:
Successful run! (In 'success')
and then no more runs. Seems pretty obvious that the reset call needs to be made. After reading the code, I can't see what's wrong, so I'll start doing some harder debugging.