search for: emailqueue

Displaying 5 results from an estimated 5 matches for "emailqueue".

Did you mean: mailqueue
2006 Feb 23
1
RailsCron: ''every'' in background
...Cron.create "every": >From README: RailsCron.create( :command => "Object.do_something()", :start => 2.minutes.from_now, :every => 12.hours, # default: 1.day :finish => 2.years.from_now # optional ) class EmailQueue < ActiveRecord::Base background :deliver, :every => 1.minute, :concurrent => true def self.deliver #process the queue end end It seems to me that the create method creates a job that runs every 12 hours. If the command were "EmailQueue.deliver",...
2007 Apr 06
2
Best way to start a worker
...done - very straightforward. My question is, what would be the best way to run this? I have assumed a cron like scheduled worker with a named key, but I don?t know. My worker looks like this: class EmailProcessorWorker < BackgrounDRb::Worker::RailsBase def do_work(args) queue = EmailQueue.new queue.process_queue end end EmailProcessorWorker.register I do all the work in a Rails Model, since I can unit test it outside of backgroundrb. Does anyone have a backgroundrb_schedules.yml file I could use as an example, and should this run something like every 15 minutes, et...
2006 Jan 25
24
RailsCron 0.2 plugin
.... So I implemented a graceful start/restart inside of the plugin''s init.rb. If you don''t like it, comment it out and send me the feedback. Also, I finished an update to RailsCron that allows you to attach asynchronous processing methods to your ActiveRecord models. i.e.: class EmailQueue < ActiveRecord::Base background :deliver, :every => 10 #seconds, or 1.minute, etc def self.deliver #process the queue end end If your deliver method takes a minute to process (like some of my async methods do), then RailsCron will NOT load up multiple threads of the same command every...
2006 Feb 19
4
Sending Scheduled Email Ticklers
Hi All, I am developing a RoR app for managing community information and would like to have an summary of current events and interests mailed out monthly. The tickler email would be a basic summary of items and links back to the site. I would like to schedule the email delivery dates and have the app send out email to registered users that opted for this service. Once scheduled, a monthly
2006 Feb 14
7
Action when database changes
Hello, Is it possible to trigger an action in a controller when a table from database changes? I thought about using an utility like cron (railscron) to check every, e.g. 2 s, if the table changed, but I am wondering if there is a solution a bit more ''elegant'': to trigger an action exactly when the change is made. Best regards, -- Kuba Nowak