Skip to content

Instantly share code, notes, and snippets.

@alnutile
Created August 28, 2014 20:04
Show Gist options
  • Save alnutile/60a963729a2de6a01034 to your computer and use it in GitHub Desktop.
Save alnutile/60a963729a2de6a01034 to your computer and use it in GitHub Desktop.
Here is how I clear the route now via an example url
/**
* 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