[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] Newsgroup ordering, downloading, and signals



>In light of recent discussions here about the order in which groups
>are downloaded, I had a quick look at the source: my reading is that
>the order is defined by the order that 'readdir' returns the group
>names from .../interesting.groups/ (see 'processupstream' in
>fetchnews.c). Is this system dependent, or is the order specified
>somewhere (its not mentioned in the Linux man pages I have)?

It's very, very system dependent. The entries are read in the order in which 
the file system driver passes them on. Try the unsorted option on ls to see 
what this is. Some filesystems will return them in alphabetical order --- 
reiserfs might --- some will just dump the contents of the directory inode; 
historically, it was possible to read directories as files and parse the inode 
structure directly.

>Related to this, someone said that changing the order wouldn't help
>since fetchnews needs to run to completion for you to see news -
>interrupting it loses news. Why? I haven't spent all that much time
>with the source - how hard would it be to get the news just received
>flushed out to disk and accessible through leafnode, even if only on a
>per-group basis? Do I also remember someone saying this was on the
>feature list for leafnode 2.0?

It only updates the overview files once it's done everything else, and the 
newsreader won't see the the news until the overview files are updated. 
Interrupting leafnode *won't* cause you to lose news. When it's interrupted, 
it will update the overview files immediately and the news will become 
visible. (Cornelius, what happens to part-downloaded files?)

>I suppose where I'm going with this is: how hard would it be to get
>leafnode to abort cleanly - and not lose news - eg on receipt of a
>signal?

That's exactly what it does.

>Alternatively, as I have an ISP which charges for dial-up during
>weekdays, but is free in the evenings and at weekends, is there a way
>to have two lists of groups to download - one to download always,
>announce newsgroups (especially my ISPs announcement group) - and one
>to download only at certain times (when phone calls are free!)? Script
>to regenerate the contents of .../interesting.groups/ before fetchnews
>is run?

Have interesting.groups.offpeak and interesting.groups.onpeak directories, and then use a cron script to symlink them to interesting.groups at the appropriate time of day. You'll want something to move newly interesting newsgroups out of .onpeak and into .offpeak, too, but this wouldn't be hard.

-- 
+- David Given ---------------McQ-+ "I must have spent at least ten minutes
|  Work: dg@xxxxxxxxxxxxx         | out of my life talking to this joker like
|  Play: dgiven@xxxxxxxxx         | he was a sane person. I want a refund." ---
+- http://wired.st-and.ac.uk/~dg -+ Louann Miller, on rasfw                    



-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list