Russ wrote: > We have a template that basically trickles mail out (we store mail in the > database, and the template generates the actually cf_mail calls, etc and > sends out batches of 1000) at a time. Is there a way to somehow do a cross > server lock so that each of our 2 servers doesn't try sending out the same > emails? > > I don't think this is possible to do in ColdFusion itself, maybe through > some kind of database lock?
Yes. Look up SELECT ... FOR UPDATE in your database manual. Use in conjunction with NOWAIT if you want 1000 messages per server, or without if you want 1000 messages in total. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231617 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

