Re: newslink.js - import PTRs
By: Ash-Fox to DOVE-Net.Synchronet_JavaScript on Fri Nov 16 2007 04:04 pm
Greetings all,
Recently I've linked my BBS to a rather unreliable news server (there is unique groups on there that other news servers don't have). Unfortunately because of it's unreliability I've had a bunch of issues trying to mirror all the content, as I keep running into various problems such as:
- Random disconnects
- Infinite loop (100000000 branches) detected issue
To get around the Infinite loop problem, I tried setting at the beginning of newslink.js the following:
branch_limit = "0";
Unfortunately, that seems to do nothing at all.
That's because branch_limit is a property of the 'js' object, so you would want to use:
js.branch_limit = 0;
instead.
Whenever a random issue happens, be it disconnection or infinite loop, the message import PTRs are not updated, so, the BBS starts from the beginning and ignores a bunch of messages after downloading them as it already has them.
A disconnection will not cause the PTRs to not be updated. Only a JS exception (like the infinite loop detection) would cause that.
I looked at the sourcecode of where the pointers are retrieved, from my understanding it's from the .snl file in /data/subs/. Unfortunately when I open it up, it's in some binary format I don't quite understand. Looking at the javascript code, used newslink.js, I'm just not getting how it's set.
So I can't manually fix the number.
I've resorted to temporarily hardcoding the PTR number in the newslink.js, but I think a better workaround would be updating the PTR number in
the .snl file everytime a article is downloaded, rather than when the
entire transaction is complete.
While I do more or less understand what's going on in newslink.js, I'm really confused about what I would need to modify in the file to make this happen and would appreciate help on this. I also consider the fact that
PTRs aren't updated with every article download is a bug.
I'd suggest limiting the number of messages downloaded per execution of newslink.js and that'll avoid the problem altogether with no modification of newslink.js necessary.
digital man (xbox-live: digitlman)
Snapple "Real Fact" #96:
The average American will eat 35,000 cookies in his/her lifetime.
Norco, CA WX: ---.-øF, --% humidity, NaN mph --- wind, --.-- inches rain/24hrs
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net