create even less load
This commit is contained in:
parent
85ee01e1f9
commit
18fdb34b3f
1 changed files with 2 additions and 4 deletions
|
@ -50,7 +50,7 @@ c3nav = {
|
||||||
},
|
},
|
||||||
load_searchable_locations: function() {
|
load_searchable_locations: function() {
|
||||||
$.getJSON('/api/locations/?searchable', c3nav._searchable_locations_loaded).fail(function() {
|
$.getJSON('/api/locations/?searchable', c3nav._searchable_locations_loaded).fail(function() {
|
||||||
window.setTimeout(c3nav.load_searchable_locations, c3nav.init_completed ? 120000 : 5000);
|
window.setTimeout(c3nav.load_searchable_locations, c3nav.init_completed ? 300000 : 15000);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
_searchable_locations_loaded: function(data) {
|
_searchable_locations_loaded: function(data) {
|
||||||
|
@ -70,7 +70,7 @@ c3nav = {
|
||||||
if (!c3nav.init_completed) {
|
if (!c3nav.init_completed) {
|
||||||
c3nav.continue_init();
|
c3nav.continue_init();
|
||||||
}
|
}
|
||||||
window.setTimeout(c3nav.load_searchable_locations, 42000);
|
window.setTimeout(c3nav.load_searchable_locations, 120000);
|
||||||
},
|
},
|
||||||
continue_init: function() {
|
continue_init: function() {
|
||||||
c3nav.init_map();
|
c3nav.init_map();
|
||||||
|
@ -129,8 +129,6 @@ c3nav = {
|
||||||
|
|
||||||
window.onpopstate = c3nav._onpopstate;
|
window.onpopstate = c3nav._onpopstate;
|
||||||
|
|
||||||
window.setTimeout(c3nav.load_searchable_locations, 42000);
|
|
||||||
|
|
||||||
if (window.mobileclient) {
|
if (window.mobileclient) {
|
||||||
window.setInterval(function() { mobileclient.scanNow(); }, 4000);
|
window.setInterval(function() { mobileclient.scanNow(); }, 4000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue