Well you want to use a custom rake task so the scripts are kept in svn
(easier to manage the code)

Something like this (untested of course)

http://pastie.org/334452

Assumes ActiveRecord but you can use whatever there.. also assumes you have
your notification script  wrapped in a module called 'CustomBulkNotifer'  -
you generally want to keep rake tasks to a minimum..


On Mon, Dec 8, 2008 at 2:41 PM, liquid_rails <[EMAIL PROTECTED]>wrote:

>
> Ok, so write an net/smtp script to send out email notifications and a
> seperate sql script to move the records to another database, and
> execute both scripts via cronjob?
>
> On Dec 8, 1:27 pm, "John Bresnik" <[EMAIL PROTECTED]> wrote:
> > Yea assuming a 100 every 5 minutes, that's a lot per day..  you could
> still
> > process them all with a single SQL call but queue up the email
> > notifications.. thing is your notifications will likely be an issue too
> esp
> > if youre using ActionMailer (which isnt really designed for bulk mail).
> > Youre likely going to have to use net/smtp directly and since the
> recipients
> > are all different, they have to be processed one at a time.. good news is
> > problem is solvable.
> >
> > On Sun, Dec 7, 2008 at 10:43 PM, liquid_rails <[EMAIL PROTECTED]
> >wrote:
> >
> >
> >
> > > Let's say more than 100  I'm thinking to schedule the process to run
> > > once a day...
> >
> > > On Dec 7, 6:34 pm, "John Bresnik" <[EMAIL PROTECTED]> wrote:
> > > > If you ran it every 5 minutes - how many records are we talking abt?
> >
> > > > On Dec 7, 2008 3:44 PM, "liquid_rails" <[EMAIL PROTECTED]>
> > > wrote:
> >
> > > > Everytime I delete a record (i.e. move it to the deleted items
> > > > database) I want to send an email to the poster letting him know that
> > > > his post was deleted.  Do you still recommend straight SQL for this?
> >
> > > > Thanks!
> >
> > > > On Dec 6, 3:43 pm, "John Bresnik" <[EMAIL PROTECTED]> wrote: > Yea
> you
> > > > really gotta pay attention ...
> >
> > > > > On Sat, Dec 6, 2008 at 12:57 PM, caike <[EMAIL PROTECTED]>
> > > wrote: >
> > > > > Actually it really wou...
> > > > > > On Sat, Dec 6, 2008 at 5:22 AM, Steven Fines <
> [EMAIL PROTECTED]>
> >
> > > > wrote: > > >> An even better ...
> >
> > > > > >> On Fri, Dec 5, 2008 at 7:33 PM, John Bresnik <
> [EMAIL PROTECTED]>
> >
> > > > wrote: > > >>> You should str...
> >
> > > > > >>> On Dec 5, 2008 1:38 PM, "liquid_rails" <
> [EMAIL PROTECTED]>
> > > > > >>> wrote: > > >>> Thanks, but I don't even know how to write the
> > > script
> >
> > > > or the code for > >>> mov...
> >
> >
> >
>

--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---

Reply via email to