Created
August 28, 2014 20:04
-
-
Save alnutile/60a963729a2de6a01034 to your computer and use it in GitHub Desktop.
Here is how I clear the route now via an example url
This file contains hidden or 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
| /** | |
| * In this example we get the next job in the Queue | |
| * Considering it is the job and class | |
| * \Foo\ExampleQueueIlluminateHandler@fire | |
| * you can see things there and in the logs | |
| */ | |
| $core->getApp()->get('/get_job_illuminate', function() use ($core){ | |
| try { | |
| $results = $core->getApp()['queue.illuminate.worker']->pop('default', $core->getApp()['queue.illuminate.queue_name'], 3, 64, 30, 0); | |
| return $core->getApp()->json("Job Cleared " . $results['job']->getJobId()); | |
| } catch (\Exception $e) { | |
| $core->getApp()['dispatcher']->dispatch('illuminate.queue.failed', new FilteredQueueEventError($core->getApp()['queue.illuminate'], $e->getMessage(), $core->getApp())); | |
| return $core->getApp()->json("Error getting job ". $e->getMessage()); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment