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

Questions about environment dependencies #10

Open
goldenapples opened this issue Dec 14, 2015 · 2 comments
Open

Questions about environment dependencies #10

goldenapples opened this issue Dec 14, 2015 · 2 comments

Comments

@goldenapples
Copy link

Hi, I'm just getting started playing with this library. One thing I've noticed is that in my local development environment (a more or less stock VIP Quickstart Vagrant box on a Macbook Pro), the post to admin-post.php always fails with the 0.01s timeout in the plugin.

Is there a reason why this needs to be set so low? The request is non-blocking anyways, Is there any reason a default timeout can't work?

In addition, the only way I could make the admin-post callback complete was by adding @ignore_user_abort( true ); to my local admin-post.php (or the equivalent value in php.ini, though that's even sketchier...). Is this a requirement for the plugin to work, and if so, should it be documented somewhere?

@rayrutjes
Copy link

Currently also having issues debuging the remote calls. Locally I have every request failing but the actual tasks are correctly run. That said, on some other environments, the task will not run, but the errors remain the same.

I agree with @goldenapples , we should try to document the requirements for the "async" trick to work. Currently I do not feel it is very reliable.

Some points that needs to be addressed:

  • The host must be reachable from inside the machine
  • Explain the timeout, and if it is ok always failing
  • Any SSL related requirements?
  • Explain differences between auth. users and not, and also give some examples
  • Other?

Great work though! Keep it up!

@r-a-y
Copy link
Contributor

r-a-y commented Jun 26, 2016

the post to admin-post.php always fails with the 0.01s timeout in the plugin.

0.01 is the same timeout as used when WP triggers cron in spawn_cron(). This timeout value has been talked about on WP Trac a few times, most notably:
https://core.trac.wordpress.org/ticket/18738

There probably should be a filter for the arguments in wp_remote_post() similar to WP Cron. See #12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants