backgroundrb and tasks

Give me please example How i can send send email from Backgroundrb worker and How get access to my modele User

my config

You are running an old version of backgroundrb, please update your plugin from here:

http://svn.devjavu.com/backgroundrb/trunk/

Full instructions can be found here:

http://backgroundrb.rubyforge.org/

So your worker with new plugin would look like:

class PsWorker < BackgrounDRb::MetaWorker   set_worker_name :ps_worker   # gets called when worker is created   def create(args)     deliver_test_mail()     add_periodic_timer(2*60) { deliver_test_mail }   end      def deliver_test_mail      Sende1.deliver_test   end end

Inside your workers, you have full access to your rails environment( and hence model and everything).

For more information, you can join backgroundrb mailing list on:

http://rubyforge.org/mailman/listinfo/backgroundrb-devel