-
Notifications
You must be signed in to change notification settings - Fork 0
Code Review Bench PR #25799 - Removed xmlrpc/pingomatic ping service #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -310,12 +310,12 @@ async function initServices() { | |||||||||
| debug('Begin: initServices'); | ||||||||||
|
|
||||||||||
| debug('Begin: Services'); | ||||||||||
| // NOTE: If you need to add dependencies for services, use npm install <package> | ||||||||||
| const identityTokens = require('./server/services/identity-tokens'); | ||||||||||
| const stripe = require('./server/services/stripe'); | ||||||||||
| const members = require('./server/services/members'); | ||||||||||
| const tiers = require('./server/services/tiers'); | ||||||||||
| const permissions = require('./server/services/permissions'); | ||||||||||
| const xmlrpc = require('./server/services/xmlrpc'); | ||||||||||
| const slack = require('./server/services/slack'); | ||||||||||
| const webhooks = require('./server/services/webhooks'); | ||||||||||
| const scheduling = require('./server/adapters/scheduling'); | ||||||||||
|
|
@@ -347,9 +347,9 @@ async function initServices() { | |||||||||
| await stripe.init(); | ||||||||||
|
|
||||||||||
| // NOTE: newsletter service and email service depend on email address service | ||||||||||
| await emailAddressService.init(), | ||||||||||
|
|
||||||||||
| await Promise.all([ | ||||||||||
| emailAddressService.init(), | ||||||||||
| identityTokens.init(), | ||||||||||
| memberAttribution.init(), | ||||||||||
| mentionsService.init(), | ||||||||||
|
|
@@ -361,15 +361,11 @@ async function initServices() { | |||||||||
| postsPublic.init(), | ||||||||||
| membersEvents.init(), | ||||||||||
| permissions.init(), | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 Bug: slack.listen() removed — breaks Slack notificationsThe The This line should be restored in the Was this helpful? React with 👍 / 👎
Suggested change
|
||||||||||
| xmlrpc.listen(), | ||||||||||
| slack.listen(), | ||||||||||
| audienceFeedback.init(), | ||||||||||
| emailService.init(), | ||||||||||
| emailAnalytics.init(), | ||||||||||
| webhooks.listen(), | ||||||||||
| scheduling.init({ | ||||||||||
| apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true) | ||||||||||
| }), | ||||||||||
| scheduling.init(), | ||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚨 Bug: Missing apiUrl parameter in scheduling.init() causes crashThe if (!apiUrl) {
throw new errors.IncorrectUsageError({message: 'post-scheduling: no apiUrl was provided'});
}This will cause Ghost to crash on boot with an The original code was: scheduling.init({
apiUrl: urlUtils.urlFor('api', {type: 'admin'}, true)
})This parameter must be restored. Was this helpful? React with 👍 / 👎
Suggested change
|
||||||||||
| comments.init(), | ||||||||||
| linkTracking.init(), | ||||||||||
| emailSuppressionList.init(), | ||||||||||
|
|
||||||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
emailAddressService.init()was previously called withawaitbefore thePromise.all()block, ensuring it completed before dependent services. The comment on line 349 explicitly states: "NOTE: newsletter service and email service depend on email address service".In the new code,
emailAddressService.init()is moved inside thePromise.all()array, meaning it now runs in parallel withemailService.init()and other services that depend on it. This creates a race condition — ifemailService.init()completes its initialization beforeemailAddressService.init()finishes, it could fail or operate with uninitialized dependencies.This should be restored to sequential execution before the
Promise.all()block:Was this helpful? React with 👍 / 👎