This commit is contained in:
@@ -7,7 +7,7 @@ const MAX_POLLING_INTERVAL = 15 * 60 * 1000; //15 minutes maximum wait time
|
||||
export default {
|
||||
async startPolling() {
|
||||
keepPolling = true;
|
||||
let pollingInterval = DEFAULT_POLLING_INTERVAL;
|
||||
let pollingInterval = window.$gz.dev ? 20000 : DEFAULT_POLLING_INTERVAL;
|
||||
try {
|
||||
while (keepPolling == true) {
|
||||
let status = await window.$gz.api.get("notify/new-count");
|
||||
@@ -16,7 +16,7 @@ export default {
|
||||
}
|
||||
window.$gz.store.commit("setNewNotificationCount", status.data);
|
||||
//success so go to default in case it was changed by an error
|
||||
pollingInterval = DEFAULT_POLLING_INTERVAL;
|
||||
pollingInterval = window.$gz.dev ? 20000 : DEFAULT_POLLING_INTERVAL;
|
||||
await window.$gz.util.sleepAsync(pollingInterval);
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user