From 91e16ff1910240e7b740aeeeb1b11ef770211393 Mon Sep 17 00:00:00 2001 From: Matteo Pagliazzi Date: Tue, 24 May 2016 22:40:54 +0200 Subject: [PATCH] do not run cron when loading party to avoid race conditions --- website/server/controllers/api-v3/groups.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/server/controllers/api-v3/groups.js b/website/server/controllers/api-v3/groups.js index 07e9b5be54..7460757a51 100644 --- a/website/server/controllers/api-v3/groups.js +++ b/website/server/controllers/api-v3/groups.js @@ -117,6 +117,9 @@ api.getGroups = { api.getGroup = { method: 'GET', url: '/groups/:groupId', + // Disable cron when getting groups to avoid race conditions when the site is loaded + // and requests for party and user data are concurrent + runCron: false, middlewares: [authWithHeaders()], async handler (req, res) { let user = res.locals.user;