Created
December 16, 2015 06:40
-
-
Save simkimsia/fe85c39695808d3ae8a6 to your computer and use it in GitHub Desktop.
How to use queuesadilla in a Cake 3.x controller action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class TasksController extends AppController { | |
//.. code | |
public function execute_it($id) { | |
$task = $this->Tasks->get($id); | |
$_worker = envDefault('WORKER_CLASS', 'Sequential'); | |
$WorkerClass = "josegonzalez\\Queuesadilla\\Worker\\" . $_worker . "Worker"; | |
$worker = new $WorkerClass($engine, $logger, ['maxIterations' => 5]); | |
$worker->work(); | |
} | |
// .. code | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment