| 1 |
<?php |
| 2 |
|
| 3 |
namespace ImageSeoWP\Async; |
| 4 |
|
| 5 |
defined('ABSPATH') or die('Cheatin’ uh?'); |
| 6 |
|
| 7 |
class QueryTotalImagesBackgroundProcess extends WPBackgroundProcess |
| 8 |
{ |
| 9 |
protected $action = 'imageseo_query_total_images_background_process'; |
| 10 |
|
| 11 |
/** |
| 12 |
* Task. |
| 13 |
* |
| 14 |
* @param mixed $item Queue item to iterate over |
| 15 |
* |
| 16 |
* @return mixed |
| 17 |
*/ |
| 18 |
protected function task($item) |
| 19 |
{ |
| 20 |
imageseo_get_service('QueryImages')->getTotalImages([ |
| 21 |
'forceQuery'=> true, |
| 22 |
'withCache' => false, |
| 23 |
]); |
| 24 |
|
| 25 |
return false; |
| 26 |
} |
| 27 |
} |
| 28 |
|