[typo] Slow spam checking makes Baby Jesus cry

Piers Cawley pdcawley at bofh.org.uk
Sun Aug 20 16:51:14 EDT 2006

Josh Susser <josh at hasmanythrough.com> writes:

> On Aug 20, 2006, at 1:02 PM, Piers Cawley wrote:
>> The catch is, IPSocket.getaddress, which is what we use for DNS
>> lookups, appears to be be a blocking call, which with the nature of
>> Ruby threads, means it'll *still* hold up processing during the
>> lookup.
>> Thoughts?
> What about using BackgrounDRb to do the spam processing  
> asynchronously? Toss the comments to be processed into a queue in the  
> DB, fire up a BDRb worker, and walk away.

A nice idea to be sure, but my hosting service is quite picky about
long running processes that aren't fast cgi processes launched by
their copy of apache. I'm happy enough to catch a SIGKILL and do a
Thread.list.each {|t| t.join}, from within dispatch.fcgi, but that's
about as far as it goes.

Piers Cawley <pdcawley at bofh.org.uk>

More information about the Typo-list mailing list