do not run cron when loading party to avoid race conditions

This commit is contained in:
Matteo Pagliazzi
2016-05-24 22:40:54 +02:00
parent c7d3539815
commit 91e16ff191

View File

@@ -117,6 +117,9 @@ api.getGroups = {
api.getGroup = { api.getGroup = {
method: 'GET', method: 'GET',
url: '/groups/:groupId', 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()], middlewares: [authWithHeaders()],
async handler (req, res) { async handler (req, res) {
let user = res.locals.user; let user = res.locals.user;