Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: SpamAssassin: users

R: R: Non-DNS async support

 

 

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded


g.tomassoni at libero

Sep 20, 2007, 4:03 AM

Post #1 of 1 (154 views)
Permalink
R: R: Non-DNS async support

> -----Messaggio originale-----
> Da: Mark Martinec [mailto:Mark.Martinec+sa [at] ijs]
>
> Giampaolo,
>
>
> Not really (at least not in the current trunk I'm looking at).
> As long as there are any (non timed-out) requests in %$pending,
> it does not terminate, even if poll returns empty-handed.

Well, I have 3.2.1 and the excerpt from AsyncLoop.pm was from there.

But anyway, how is supposed to be set the timeout value of a non-DNS query?
Maybe my code stops due to a timeout: messages are non that clear...

dbg: uri_whois: Resolved 61994/whois.verisign-grs.com/A/IN to 199.7.51.74
dbg: uri_whois: Starting whois query for yahoo.com to
whois.verisign-grs.com (199.7.51.74)
dbg: async: queries completed: 1 started: 1
dbg: async: queries active: DNSBL-A=2 URIWHOIS-A=1 at Wed Sep 19 18:02:13
2007
dbg: async: select found no socks ready
dbg: uri_whois: Connected whois query for yahoo.com to
whois.verisign-grs.com
dbg: async: queries completed: 0 started: 0
dbg: async: queries active: DNSBL-A=2 URIWHOIS-A=1 URIWHOIS-WHOIS=1 at
Wed Sep 19 18:02:14 2007
dbg: dns: success for 23 of 27 queries
| dbg: dns: timeout for after 1 seconds
| dbg: dns: timeout for whois after 1 seconds
| dbg: dns: timeout for after 1 seconds
| dbg: dns: timeout for whois,whois-lastexternal after 1 seconds

It may even be a timeout, then. It seems to me there is no way to set a
lookup timeout in start_lookup() in AsyncLoop.pm. Right?

By the way, it may be that the Async code is undergoing many changes. Is
there any SA version in which it could be regarded as stable?

Thanks,

Giampaolo

> And 'a request' is a rather general term. Currently it covers
> DNS requests, but in principle could be other kind of 'requests'.
> There are routines for submitting and terminating requests.
>
> I'd be interested too if more general usage emerges, perhaps
> along with a somewhat cleaned/generalized API. My wish is
> to provide a mechanism for Plugins (such as DKIM, SPF, Razor2)
> to use the same async services and avoid doing their network
> lookups synchronously on their own. Suggestions welcome.
> If only Perl could have a way of expressing co-routines,
> then one could build a simple task scheduler, with task queues
> on blocked resources, etc.
>
> > Does anybody knows which is the API to the async stuff? Maybe
> > I didn't get it at all and I'm attempting to use it the wrong way...
>
> Not much docs about API, but see comments on subroutines in
> AsyncLoop.pm, and their typical usage by Dns.pm.
>
> Mark

SpamAssassin users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.