2017 © Pedro Peláez
 

elefant-app app-resque

PHP-Resque integration for the Elefant CMS

image

elefant/app-resque

PHP-Resque integration for the Elefant CMS

  • Tuesday, September 17, 2013
  • by jbroadway
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Resque app for Elefant

This is an app that integrates PHP-Resque into the Elefant CMS, so you can easily add background tasks to your apps., (*1)

Requirements

PHP-Resque requires Redis 2.2+ as well as the PCNTL extension., (*2)

Installation

  1. Install the app into the apps/ folder.
  2. Copy apps/resque/conf/config.php to conf/app.resque.config.php and edit the settings there.

Adding jobs to the queue

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 jobs

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)

Running the workers

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 spawn

The Versions

17/09 2013

dev-master

9999999-dev

PHP-Resque integration for the Elefant CMS

  Sources   Download

MIT

The Requires

 

app scheduler cms queue cron resque workers tasks elefant background tasks task queue