Yeah, it's definitely kludgey but a whole lot faster than reloading the whole stack each time. I went from a min of 10-15 seconds per email, to a second when there's a mail to process to milliseconds when not.
there's probably a better way to do it with a background process though. maybe worker or the like? On Apr 29, 12:44 pm, MichelV69 <[email protected]> wrote: > On Apr 27, 5:28 pm, kevinpfromnm <[email protected]> wrote: > > > > > there might be a better way to do this, but I found that starting a > > new stack (like rake tasks or script/runner) takes a long time. > > > what I did in an app that processes a lot of emails, was make a > > maintenance controller that triggered methods for cronlike jobs. then > > just call it with a wget in cron and drop the output. > > > originally, I was calling script/runner for every incoming email which > > was ugly at 5-10 seconds per start. even with a cron job checking for > > new emails to process it was tying up too much processor time. it's a > > moderate server for an internal app that really have no way to scale > > hardware up. > > > obviously, this approach only works for things that can't be abused > > (open security holes, DOS attacks, etc.). so no parameters, no info > > return. > > Hi, Kevin! Thanks for the suggestion. I had thought of this as a > solution, but it seemed inelegant. I was rather hoping there was a > solution to my issue directly, instead of changing the whole process > to avoid it. > > --Michel > > -- > You received this message because you are subscribed to the Google Groups > "Hobo Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/hobousers?hl=en. -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
