[Backgroundrb-devel] [PATCH] allow different environments and move config into seperate class
hemant
gethemant at gmail.com
Thu Feb 21 06:50:55 EST 2008
On Thu, Feb 21, 2008 at 2:30 PM, Alex Peuchert
<rubyonrails-ug at peuchert.de> wrote:
> Hi, I had the problem of running different BackgrounDRB processes with
> different environments on the same box. BackgrounDRB does not support
> that, so I added a little bit of code. I opened ticket #80 on devjavu
> with the patch attached.
>
> * script/backgroundrb now supports cli parameters
>
> * -h for help
> * -e to choose an environment
>
> * moved configuration handling into lib/bdrb_config.rb
>
> if there is an entry in backgroundrb.yml with the environment name
> that entry is merged back into the config, eg:
>
> ---
> :development:
> :backgroundrb:
> :port: 11111
> :production:
> :backgroundrb:
> :port: 11113
>
> :backgroundrb:
> :ip: localhost
> :port: 11006
>
> if you run this under development port will be 11111, under
> production port will be 11113 (this is pretty cool, you can add
> config instructions depending on the environment, even schedules:)
>
> * the PID files goes into tmp/pids/
>
> * PID and LOG file names now include the port for differentiation
>
> Hope this improves BackgrounDRB a little bit.
Awesome. I am having a look and commit them accordingly. Also, as a
rule, you are qualified for commit access, so create an account on
gitorious and let me know your login handle.
http://gitorious.org/projects/backgroundrb
More information about the Backgroundrb-devel
mailing list