Created
December 4, 2012 17:19
-
-
Save JesseObrien/4206439 to your computer and use it in GitHub Desktop.
Resque bootstrap for Laravel 3
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 | |
// Bootstrap the laravel environment for our resque workers. | |
require 'paths.php'; | |
require path('sys').'core.php'; | |
Laravel\Bundle::start(DEFAULT_BUNDLE); | |
\Autoloader::directories(array( | |
path('app').'workers', | |
)); | |
/* | |
|---------------------------------------------------------------- | |
| Application Environment | |
|---------------------------------------------------------------- | |
| | |
| When calling the resque.php from the CLI we can specify the | |
| environment to use. This is done with ENV=environment. This is | |
| always required. | |
| | |
| IE: ENV=development php resque.php | |
| | |
*/ | |
$env = getenv('ENV'); | |
if(empty($env)) | |
{ | |
die("Set ENV env var with the Laravel environtment to use.\n"); | |
} | |
Request::set_env($env); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment