dev-master
9999999-devPHP-Resque integration for the Elefant CMS
MIT
The Requires
app scheduler cms queue cron resque workers tasks elefant background tasks task queue
Wallogit.com
2017 © Pedro Peláez
PHP-Resque integration for the Elefant CMS
This is an app that integrates PHP-Resque into the Elefant CMS, so you can easily add background tasks to your apps., (*1)
PHP-Resque requires Redis 2.2+ as well as the PCNTL extension., (*2)
apps/ folder.apps/resque/conf/config.php to conf/app.resque.config.php and edit the settings there.First you need to initialize the app for adding jobs to the queue:, (*3)
run ('resque/init');
?>
After initializing the app, you can call Resque::enqueue() anywhere after that., (*4)
'value')); ?>
Defining a job in Resque is done by creating a class named after the job name
with a perform() method that will be called on to perform the job:, (*5)
args['arg1']);
}
}
?>
Save this to your app's lib/ folder, e.g., apps/myapp/lib/JobName.php., (*6)
To start running the workers, use the following command:, (*7)
$ ./elefant resque/run
You can also override most of the settings by passing parameters to the command, including:, (*8)
--help Display help output--logging=(off|normal|verbose) Set the logging level--pid-file=./resque.pid Set the PID file--queue=queue_name Specify the queue to watch--sleep-interval=5 Seconds to sleep for--workers=5 Number of workers to spawnPHP-Resque integration for the Elefant CMS
MIT
app scheduler cms queue cron resque workers tasks elefant background tasks task queue