Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

Dispatch seems to have no effect. #2

Open
mhdtahawi opened this issue Aug 1, 2017 · 5 comments
Open

Dispatch seems to have no effect. #2

mhdtahawi opened this issue Aug 1, 2017 · 5 comments

Comments

@mhdtahawi
Copy link

mhdtahawi commented Aug 1, 2017

Hi,
Thank you for the efforts. I am sure it is not working because I am not using it correctly. I am hoping you can help me with that :)

Here is what I am doing:

class WP_Example_Request extends WP_Async_Request {

    /**
     * @var string
     */
    protected $action = 'create_send_pdf';

    /**
     * Handle
     *
     * Override this method to perform any actions required
     * during the async request.
     */
    protected function handle() {
   
	   file_put_contents("logs.txt", "writing file" );


    }

and in my code:

echo ("callign backgroudnd thread <br />");
$example_request = new WP_Example_Request();
$example_request->data( array( 'orderID' => $_GET["orderID"] ) )->dispatch();
echo (" backgroudnd thread called");

It seems like the file is not being written any where.
I am trying to find a way to log what I am doing, to be able debug later.

Anything I am doing wrong?

@elvismdev
Copy link

@mhdtahawi I have the same issue, did you figure this out?

@w33zy
Copy link

w33zy commented Nov 12, 2018

It's my first time looking at this library and I am having the same issue.

I am using background processing and I am seeing the wp_{action} added to the wp_options table but I am not seeing any new WP Cron events added to the queue.

@DeveloperWil
Copy link

Did anyone ever get a fix for this? My dispatch is not adding new cron jobs either.

@ram33z
Copy link

ram33z commented Sep 15, 2019

same issue

@DeveloperWil
Copy link

Looks like it's borked. I'm going to go with Delicious Brains background processor - looks like it's written by the same guy but hopefully it works https://github.com/deliciousbrains/wp-background-processing

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

No branches or pull requests

5 participants