-
Notifications
You must be signed in to change notification settings - Fork 55
Added --autoloader/-a option to fresque start command #37
base: master
Are you sure you want to change the base?
Conversation
added autoloader option to start $this->commandTree
|
Did you take a look at https://github.com/kamisama/Fresque/blob/master/lib/Fresque.php#L194 ? Is it different ? |
|
Yes, that is where it was inspired from. Basically I needed the ability to add different bootstraps for different webapps on the same server so I used the --autoloader option from the test command and added it to the start command. There is one other deficiency, I cannot pass custom arguments to the bootstrap. I would like to propose something like --arguments APPLICATION=staging FOO=bar |
|
You can try using environment variables.
|
|
And if you have different webapps, why don't you put these settings in a fresque .ini file, and have one .ini file per webapp ? |
|
Will try that and see what happens. Because I am using jenkins and it is far easier to pass on the variable via cli than to have to grab the var, generate an entirely new ini file when all you want to do is override one variable. |
|
The suggested approach to setup the environment variables doesn't work. You are creating a new command, under a different user which spawns off to be a new process and the environment vars that are set will only affect the existing command. I recommend the --arguments option or some option in fresque.ini that'll allow you to initialise the environment variables when constructing the $cmd. Let me know what you think, if you think its a good idea, I'll whip something up. Also, do let me know what you want to do with the --autoloader argument for the start command. |
|
For the environment variables in the config, I'd like something like https://github.com/kamisama/Cake-Resque/blob/master/Config/config.php#L135, to maintain compatibility between these 2 tools. Maybe I'm still reviewing the --autoloader, it's been a while since I last touched fresque, and even php ... I propose that you separate the environment variables feature from the --autoloader, and submit another PR. |
|
I agree, I agree, I will remove the |
…vironment (if specified)" This reverts commit 6aa2fa3.
|
Any luck with this ? |
Hey,
Great project. I noticed the start option did not have any ability to override the include option in the config file so I added it to the cli. Please review and let me know what you think.
Regards