PHP code example of zorac / php-resque
1. Go to this page and download the library: Download zorac/php-resque library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zorac / php-resque example snippets
$worker = new Resque\Worker($queues);
$creator = new My\Creator();
$worker->setCreator($creator);
class Resque_Job_Creator
{
/**
* Create a new Resque Job.
*
* @param string $className Your job class name, the second argument when
* enqueuing a job.
* @param array<mixed> $args The arguments passed to your job.
*/
public static function createJob($className, $args) {
return new $className();
}
}
json
""zorac/php-resque": "^2.0"
}