From 86206d42dc29ec2837c461ed976b1e0558df4d57 Mon Sep 17 00:00:00 2001 From: Francesco Siddi Date: Fri, 17 Apr 2020 13:27:41 +0200 Subject: [PATCH] Notifications: Set timeout from 30 to 60 seconds This slightly reduces server load, as clients that keep a page open will query less often. --- src/scripts/tutti/5_1_notifications.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scripts/tutti/5_1_notifications.js b/src/scripts/tutti/5_1_notifications.js index a857a68d..68a3e35f 100644 --- a/src/scripts/tutti/5_1_notifications.js +++ b/src/scripts/tutti/5_1_notifications.js @@ -354,11 +354,12 @@ $(function() { function getNotificationsLoop() { + //- Fetch the actual notifications getNotifications(); - - var getLoop = setTimeout(function () { + //- Call itself again in 60 seconds + setTimeout(function () { getNotificationsLoop(); - }, 30000); + }, 60 * 1000); } /* Returns a more-or-less reasonable message given an error response object. */