-
-
Notifications
You must be signed in to change notification settings - Fork 495
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
Add flag to run event handlers sequentially #3423
Add flag to run event handlers sequentially #3423
Conversation
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.
Looking great! I definitely don’t want to add a temporary CLI argument for this though—I think it’d be better to keep it as a Configuration API only.
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.
I think just revert the changes in cmd.cjs and src/Eleventy.js and we’ll be good
Alright, @zachleat - removed the CLI flag entirely and moved the export default function(eleventyConfig){
eleventyConfig.setEmitterMode('sequential');
// or…
eleventyConfig.events.setHandlerMode('sequential');
} Hypothetically, we can remove the former in favor of the latter, but perhaps it's nice to have this "top-level" method since we have it for almost everything else. Let me know what you think :) |
@vrugtehagel yeah I think in docs we’ll lean towards only recommending the former method—thank you! |
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.
LGTM thank you!
Shipping with 3.0.0-beta.2 and 3.0.0-alpha.19 |
Temporary docs preview deploying here: https://11ty-website-git-v3-11ty.vercel.app/docs/events/#emitter-modes |
Resolves #3415.
This PR adds a flag to run event handlers sequentially, instead of in parallel. This is to avoid issues with plugins interfering with one another if they are doing asynchronous operations on the same set of files in parallel.