08.05.2018, 15:53
(This post was last modified: 08.05.2018, 15:53 by Erwin van der Zwart.)
Hi,
If you have a lot of clients you could add a random delay to divide all request to the controller at once by using this:
BR,
Erwin
If you have a lot of clients you could add a random delay to divide all request to the controller at once by using this:
Code:
$(function(){
if (typeof grp != 'undefined') {
grp.listen('1/1/1', function(object, state) {
var value = object.value;
if (state == 'value') {
if (value == 1) {
var x = Math.floor((Math.random() * 10000) + 1);
setTimeout(function(){
location.reload();
}, x);
grp.update('1/1/1', false);
}
}
}, true);
}
});
Erwin