Title: Async Background Worker
Author: todiadiyatmo
Published: <strong>22 ڊسمبر 2017</strong>
Last modified: 27 ڊسمبر 2017

---

پلگ انس ڳولھيو

ھي پلگ ان **WordPress جي جديد 3 وڏين رليزز** سان آزمايو نه ويو آھي. اهو ٿي سگهي 
ٿو وڌيڪ برقرار يا سپورٽ نه ٿي سگهي ۽ ٿي سگهي ٿو مطابقت جا مسئلا جڏهن ورڈپریس جي 
وڌيڪ تازي ورزن سان استعمال ڪيو وڃي.

![](https://s.w.org/plugins/geopattern-icon/async-background-worker.svg)

# Async Background Worker

 کان: [todiadiyatmo](https://profiles.wordpress.org/todiadiatmo/)

[ڊائون لوڊ ڪريو](https://downloads.wordpress.org/plugin/async-background-worker.zip)

 * [تفصيل](https://snd.wordpress.org/plugins/async-background-worker/#description)
 * [جائزو](https://snd.wordpress.org/plugins/async-background-worker/#reviews)
 * [ترقي](https://snd.wordpress.org/plugins/async-background-worker/#developers)

 [سھائتا](https://wordpress.org/support/plugin/async-background-worker/)

## وضاحت

Async Background Worker, more information please visit this page [https://tonjoo.github.io/async-background-worker/](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/](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
 2.     ```
        $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);
        ```
    
 3. Implement function
 4.     ```
        function function_to_execute_on_background($data) {
            //do something usefull
            echo "Background job executed successfully\n";
        }
        ```
    
 5. 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.

## جائزا

ھن پلگ ان لاءِ ڪي به رايا ناھن.

## تعاون ڪندڙ & ڊولپرز

“Async Background Worker” اوپن سورس سافٽ ويئر آهي. ھيٺين ماڻھن ھن پلگ ان ۾ حصو ورتو
آھي.

تعاون ڪندڙ

 *   [ todiadiyatmo ](https://profiles.wordpress.org/todiadiatmo/)
 *   [ gamaup ](https://profiles.wordpress.org/gamaup/)

[ترجمو ڪريو “Async Background Worker” توهان جي ٻولي ۾.](https://translate.wordpress.org/projects/wp-plugins/async-background-worker)

### ڊولپمينٽ ۾ دلچسپي؟

[ڪوڊ براؤز ڪريو](https://plugins.trac.wordpress.org/browser/async-background-worker/)،
چيڪ ڪريو [SVN مخزن](https://plugins.svn.wordpress.org/async-background-worker/)،
يا رڪنيت حاصل ڪريو [ڊولپمينٽ لاگ](https://plugins.trac.wordpress.org/log/async-background-worker/)
پاران [RSS](https://plugins.trac.wordpress.org/log/async-background-worker/?limit=100&mode=stop_on_copy&format=rss).

## لاگ تبدیل ڪريو

#### 1.0.0

 * Initial Release

## ميٽا

 *  Version **1.0**
 *  Last updated **8 سالَ اڳ**
 *  Active installations **10+**
 *  WordPress version ** 4.4 يا وڌيڪ **
 *  Tested up to **4.9.29**
 *  Language
 * [English (US)](https://wordpress.org/plugins/async-background-worker/)
 *  [ترقي يافته ڏيک](https://snd.wordpress.org/plugins/async-background-worker/advanced/)

## درجه بندي

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/async-background-worker/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/async-background-worker/reviews/)

## تعاون ڪندڙ

 *   [ todiadiyatmo ](https://profiles.wordpress.org/todiadiatmo/)
 *   [ gamaup ](https://profiles.wordpress.org/gamaup/)

## سھائتا

چوڻ لاءِ ڪجهه آهي؟ مدد گهرجي؟

 [ڏسو سپورٽ فورم](https://wordpress.org/support/plugin/async-background-worker/)