Skip to content
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

Closed
adamziel opened this issue Sep 11, 2024 · 5 comments
Closed

Comments

@adamziel
Copy link
Collaborator

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.

@swissspidy
Copy link
Member

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.

@brandonpayton
Copy link
Member

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.

@brandonpayton brandonpayton moved this from Inbox to Needs Author's Reply in Playground Board Sep 12, 2024
@swissspidy
Copy link
Member

It performs a loopback request though. Do these work?

@adamziel adamziel moved this from Needs Author's Reply to Inbox in Playground Board Sep 12, 2024
@adamziel
Copy link
Collaborator Author

adamziel commented Sep 25, 2024

They do! As of #1287 :)

@adamziel
Copy link
Collaborator Author

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.

@adamziel adamziel closed this as not planned Won't fix, can't repro, duplicate, stale Sep 30, 2024
@github-project-automation github-project-automation bot moved this from Needs Triage/Our Reply to Done in Playground Board Sep 30, 2024
adamziel added a commit that referenced this issue Nov 29, 2024
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`)
adamziel added a commit that referenced this issue Nov 29, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants