-
Notifications
You must be signed in to change notification settings - Fork 275
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
Consider setting "DISABLE_WP_CRON": true by default in the web version #1749
Comments
Does WP cron even work in Playground? 😄 I'd assume it doesn't. Just like emails. FWIW I disabled it there because I copied the existing wp-env configuration and we didn't want cron to potentially skew performance tests. |
Shouldn't WP cron work by default if it is triggered by HTTP requests? I could see someone wanting to test a plugin queuing some action to happen via cron. I think Woo plugins do a lot with Action Scheduler, and that IIUC is triggered via WP Cron. |
It performs a loopback request though. Do these work? |
They do! As of #1287 :) |
Let's not disable parts of WordPress in Playground by default – Playground is meant to be a way of bringing WordPress into new places with all WordPress features on board. At one point we may have presets such as "performance testing Blueprint" or other ones. Closing this for now. |
I disabled wp-cron a long time ago at a network bridge level with the following comment: > Disable wp-cron requests that are extremely slow in node.js runtime environment. > @todo: Make wp-cron requests faster. Playground changed a lot since then and these requests no longer seem slow in my testing. This PR, thus, reinstantes wp-cron. Related to #1749 ## Testing instructions 1. Install wp-crontrol plugin and confirm on its settings page the schedules are running as expected. Confirm there are requests to wp-cron.php in devtools and that they're not slow. 2. Try it in the web version of Playground (`npm run dev`) 3. Try it in the CLI version of Playgroynd (`bun packages/playground/cli/src/cli.ts server`)
I disabled wp-cron a long time ago at a network bridge level with the following comment: > Disable wp-cron requests that are extremely slow in node.js runtime environment. > @todo: Make wp-cron requests faster. That code path wasn't running in Node.js for months now. Also, Playground changed a lot since then and these requests no longer seem slow in my testing. This PR, thus, reinstantes wp-cron. Related to #1749 ## Testing instructions 1. Install wp-crontrol plugin and confirm on its settings page the schedules are running as expected. Confirm there are requests to wp-cron.php in devtools and that they're not slow. 2. Try it in the web version of Playground (`npm run dev`) 3. Try it in the CLI version of Playground (`bun packages/playground/cli/src/cli.ts server`) – although that one didn't even use the Wp_Http_Fetch_Base transport so nothing should change
Let's explore how helpful would setting
"DISABLE_WP_CRON": true
by default be on https://playground.wordpress.net/. @swissspidy did that in swissspidy/wp-performance-action#173 and it caught my eye.The text was updated successfully, but these errors were encountered: