[antispam-f] Re: Waiting for inbox

  • From: Frank de Bruijn <antispam@xxxxxxxxx>
  • To: antispam@xxxxxxxxxxxxx
  • Date: Wed, 02 Jun 2010 12:52:34 +0200

In article <935afb2051.ricp@xxxxxxxxxxxxxxxxxxxxx>,
   Richard Porter <ricp@xxxxxxxxxxxxxxxx> wrote:
> On 2 Jun 2010 Frank de Bruijn  wrote:
> > You really need that there? The mailbox isn't 'done' yet at that
> > point.

> Not necessarily, or rather I don't really need the wait. The reason I
> set the limit was to reduce the amount of mail which has to be
> refetched if the transfer fails for some reason, which it did when I
> returned from a short break. I had fetched 124 out of about 280
> messages.

Well, that is the problem fetching in batches is supposed to fix. The
wait is optional. It was introduced because some servers couldn't handle
an immediate reconnection.

> > I'll see if I can add some code to close the files prematurely
> > without disrupting the program flow.

> If there's a wait between fetches then it would seem sensible, but
> otherwise I accept there's not a lot to be gained. On the other hand
> if I can fetch 50 messages at a time and then wait for 30 seconds, I
> could get on with reading those messages while the next batch was
> being fetched.

I suppose it is doable, by changing things around lines 1859-1872. I'm
not sure it's a good idea, though. When there's a reconnection pending,
several things to do with finishing the fetch are held off, like running
the TaskEnd command.

You mentioned running SpamStamp and Messenger. How are they triggered?
Are you sure they will always take less than a certain amount of time to
process the download file? If AntiSpam tries to open an existing
download file when it reconnects and some other application is still
messing with it, things will go wrong...

Regards,
Frank


Other related posts: