Created
December 4, 2012 18:03
-
-
Save JesseObrien/4206961 to your computer and use it in GitHub Desktop.
Artisan task to run a job in Resque with Laravel
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 ExampleTask_Task | |
{ | |
public function run() | |
{ | |
// You can pass arguments into the worker as payload | |
$args = array('name' => 'John Smith'); | |
Resque::enqueue('MyAppName', 'ExampleWorker', $args); | |
echo "Resque job queued.\n"; | |
return; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment