mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
🐛 Fixed webhook initialization when over limit
refs https://github.com/TryGhost/Team/issues/599 - Webhook listener was still kicking in when the limit for "customIntegrations" was in place. This is due to parallel initialization that was done previously and sometimes limit service initialized before webhooks but sometimes it didn't! - Moving it to be initialized before any othe service ensures the race conditon doesnt happen anymore
This commit is contained in:
parent
9c2388e8aa
commit
1e20f2cb76
@ -157,6 +157,10 @@ async function initServices({config}) {
|
||||
|
||||
const urlUtils = require('./shared/url-utils');
|
||||
|
||||
// NOTE: limits service has to be initialized first
|
||||
// in case it limits initialization of any other service (e.g. webhooks)
|
||||
await limits.init();
|
||||
|
||||
await Promise.all([
|
||||
permissions.init(),
|
||||
xmlrpc.listen(),
|
||||
@ -164,7 +168,6 @@ async function initServices({config}) {
|
||||
mega.listen(),
|
||||
webhooks.listen(),
|
||||
appService.init(),
|
||||
limits.init(),
|
||||
scheduling.init({
|
||||
apiUrl: urlUtils.urlFor('api', {version: defaultApiVersion, versionType: 'admin'}, true)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user