[Backgroundrb-devel] passing arguments to worker method

skaar skaar at waste.org
Fri Dec 1 11:59:31 EST 2006

* tom roth (rawdlite at googlemail.com) [061201 10:33]:
>    Hello all,
>    i just started using backgroundrb and i really like it a lot so far.
>    I finally succeeded in setting up version 0.21 and the examples from the
>    readme run fine.
>    Now i do not want to create and delete my worker anytime i want it to do
>    something but call repeatedly a method  with arguments.
>    There is a arg_method defined in the readme so i guess this is a feasible
>    way to procede.
>    Unfortunatly i could not find the syntax to pass args to such a method.
>    I hope this is not too stupid a question and you excuse my BASE.

for worker methods you define yourself, there is no special syntax, you
would define it as you would with any ruby method.

If you are using the scheduler for periodic execution, you just have to
make sure that the arguments matches the one in the method definition.


>    Also i would like to know how to determine the version of backgroundrb. I
>    found it rather irritating to come across a lot of outdated documentation
>    and it took  me a while  to understand  that my rubyforge install was
>    outdated. Maybe you could consider writing a version string in
>    backgroundrb.log ?

If you add this to trac, I'll add this to the next release. If you
really want to know the version right now, you can issue:

  > BackgrounDRb::VERSION

in the console.


|\|\             where in the       |          s_u_b_s_t_r_u_c_t_i_o_n 
| | >===========  W.A.S.T.E.        |                  genarratologies 
|/|/    (_)     is the wisdom       |                  skaar at waste.org

More information about the Backgroundrb-devel mailing list