[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pan-users] overnight header updates -- just a dream?
From: |
listMAN |
Subject: |
[Pan-users] overnight header updates -- just a dream? |
Date: |
Sat, 10 Mar 2007 18:35:43 -0800 |
User-agent: |
KMail/1.9.5 |
I asked about this back in November with no meaningful reply. I know Charles
is busy with the upcoming release but maybe someone else can help us out.
My computers run 24h/d but I only launch Pan when I feel the need.
Unfortunately, I am subscribed to dozens of high volume groups that I visit
only occasionally. The current methods (load at startup or load at visit)
require that I sit through often lenghty header downloads when I finally want
to read one of these groups.
Now, if those same headers could be updated daily at 3AM? When I come along
at 11AM I only need a light touchup to make any group's header info current.
A "--upd" option to Pan that called do_xover_subscribed_groups() and exited
when the active job count decremented to zero would really be a nice feature.
Combined with cron it would shave many unproductive minutes off my Pan
sessions.
I wanted to include a patch, well... I used to know C but never learned C++.
I wrote the code but can't get it to compile because of rigid scoping rules.
It's a pity, such a simple (and useful) change.
For what its worth, here's a diff for anyone wanting to try this at home.
My sources are now a little out of date, but I doubt this code changes much:
FILE: ~/pan-0.122/pan/gui/pan.cc
175d173
< " --upd Update subscribed groups.\n"
192c190
< bool gui(true), nzb(false), upd(false);
---
> bool gui(true), nzb(false);
209,210d206
< else if (!strcmp (tok, "--upd"))
< { upd = true; gui = false; }
255,269d250
< // address@hidden
< if (upd)
< {
<
< int active(0), total(0);
< active = 1;
< do_xover_subscribed_groups();
< while (active)
< {
< sleep(10);
< }
< exit(0);
< }
<
<
Yes, the sleep() is a really bad idea. I'm sure there's a very effective
C++ method for watching a variable and acting when it reaches a value.
Any takers? Or a solution to my scope errors?
oldschool
- [Pan-users] overnight header updates -- just a dream?,
listMAN <=