Plugin info

Total downloads: 1,176
Active installs: 10
Total reviews: 0
Average rating: 0
Support threads opened: 0
Support threads resolved: 0 (0%)
Available in: 1 language(s)
Contributors: 3
Last updated: 12/27/2017 (2925 days ago)
Added to WordPress: 12/22/2017 (8 years old)
Minimum WordPress version: 4.4
Tested up to WordPress version: 4.9.28
Minimum PHP version: f

Maintenance & Compatibility

Maintenance score

Possibly abandoned • Last updated 2925 days ago

20/100

Is Async Background Worker abandoned?

Possibly abandoned (last update 2925 days ago).

Compatibility

Requires WordPress: 4.4
Tested up to: 4.9.28
Requires PHP: f

Similar & Alternatives

Explore plugins with similar tags, and compare key metrics like downloads, ratings, updates, support, and WP/PHP compatibility.

No similar plugins found yet.

Description

Async Background Worker, more information please visit this page https://tonjoo.github.io/async-background-worker/

Sample Usage

What is it ?

WordPress background worker plugin that enable WordPress to interact with beanstalkd work queue.

Why we need a worker ?

We can run a very long task in the background, for example we need to import 100.000 row into WordPress databases. Instead of doing the 100.000 import in one job, we can separate the job into many smaller job which is safer.

WP-CLI

Make sure you have WP CLI installed on your system

Support Forum

https://forum.tonjoostudio.com/thread-category/async-background-worker/

Add job to queue

  1. Add new job to new worker queue using add_async_job command

    $job = new stdClass();  
    // the function to run  
    $job->function = 'function_to_execute_on_background';  
    // our user entered data  
    $job->user_data = array('data'=>'some_data');
    add_async_job($job);
    
  2. Implement function

    function function_to_execute_on_background($data) {
        //do something usefull
        echo "Background job executed successfully\n";
    }
    
  3. Run wp background-worker listen

Command

  • wp background-worker
    Run Async Background Worker once.

  • wp background-worker listen
    Run Async Background Worker in loop (contiously), this is what you want for background worker. WordPress framework is restart in each loop.

  • wp background-worker listen-daemon
    Run Async Background Worker in loop (contiously) without restart the WordPress framework. NOTE if you use this mode, any code change will not be reflected. You must restart the Async Background Worker each time you change code. This save memory and speed up thing.

Installation

No installation instructions available

Frequently Asked Questions

No FAQ available

Review feed

No reviews available

Screenshots

No screenshots available

Changelog

1.0.0

  • Initial Release