Created
February 9, 2012 06:22
-
-
Save a-ignatov-parc/1777812 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heartbeatTimout: 4, | |
heartbeatState: YES, | |
// Обработчик heartbeat срабатывает когда по таймеру приходит время выполнить запрос | |
startHeartbeat: function() { | |
var policy = Calc.get('Policy').model; | |
Calc.requestWraper(policy, 'send', { | |
account: policy.get('AccountNumber') | |
}, { | |
action: 'do_heartbeat' | |
}); | |
}, | |
stopHeartbeat: function() { | |
Calc._heartbeatTimer && clearTimeout(Calc._heartbeatTimer); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment