Plugin configuration optionsΒΆ

This plugin can be configured via your config/app.php. It works similar to how all other CakePHP engine-based libraries work (Cache, Email, Log), and as such you can have multiple backends under different names. Here is an example config stanza:

 * Configures the Queuesadilla engine to read from mysql as it's database
 * The `url` parameter is a datasource name, as supported by CakePHP and other frameworks.
 * Some examples:
 * - beanstalkd:  beanstalk://
 * - in memory:   memory:///?queue=default&timeout=1
 * - mysql:       mysql://travis@
 * - /dev/null:   null:///?queue=default&timeout=1
 * - redis:       redis://travis@
 * - synchronous: synchronous:///?queue=default&timeout=1
 * - postgres:    pgsql://postgres@
'Queuesadilla' => [
    'default' => [
        'url' => env('QUEUESADILLA_DEFAULT_URL', ''),

Note that the config array is passed as settings to the queueing engine. Please refer to the Queuesadilla docs for more information on how each engine can be configured.

Please Note:

If your job callback is performing a database involved operation, you should check if the CakePHP database connection is still alive. It can happen that your database connection timed out, when no jobs were acknowledged for a long time. A way to come around this, is to disconnect the CakePHP connection every time a job succeeded or failed.

To do so, create a subclass of the QueuesadillaShell and implement two event listeners inside the getWorker method. You can easily do that by baking a shell with bin/cake bake shell MyQueuesadilla command and alter the created class as below:

  v: stable
On Read the Docs
Project Home
On GitHub

Free document hosting provided by Read the Docs.