[ic] email tag - large lists problem

Ton Verhagen tverhagen at alamerce.nl
Thu Feb 4 08:33:32 UTC 2010


On Feb 3, 2010, at 20:29 PM, Lyn St George wrote:

> On Wednesday 03 February 2010 18:49:34 Rick Bragg wrote:
>> Hi,
>> 
>> Is there a way to use the email tag so that IC does not have to wait
>> after sending out all mail before returning a page?
>> 
>> In other words, I am using the email tag to send out emails to a group
>> of users whenever a single user creates a new piece of content on a
>> site.
>> 
>> I have set up a system where once a user creates some new content, and
>> hits a "publish" button, a form gets passed to a "publish" routine that
>> includes a loop using the "email" tag to send a message to everyone in a
>> group.  The problem is, this group could contain thousands of email
>> addresses, and the "publish" routine would simply time out.
>> 
>> Is there a way to use a tag that does not have to loop through an email
>> list and send out mail and wait until all mail is sent before returning?
>> 
>> I would like to achive the following:
>> 
>> User publishes new content.
>> Content is saved to a table.
>> New message data is saved to a "send_message" table.
>> Then a daemon can pick that up and send out that message via email on a
>> loop.  This way a very large list can be managed.
>> 
>> Any advice?
>> 
>> Thanks
>> Rick
> 
> To solve this kind of problem in the past I've simply handed the job over to 
> the system via the at daemon, and a custom tag to do it. This frees IC to 
> immediately get on with it's main business

Or... you could hand the email sending to an Interchange child process that performs the job in the background.

Some months ago we had the need for off-loading heavy processes so the normal flow of things on a page would not be affected by those time consuming processes.
This has resulted in a child-process tag that we have donated to the Interchange project. This tag is currently part of the core and comes with a simple example (see code).

Works like a charm for us.

Ton Verhagen
Alamerce Nederland

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20100204/54b45495/attachment.htm>


More information about the interchange-users mailing list