Article View: news.software.nntp
Article #21835Re: NoCem Messages
From: Rahul Dhesi
Date: Wed, 24 Sep 1997 00:00
Date: Wed, 24 Sep 1997 00:00
40 lines
2094 bytes
2094 bytes
In <6083fs$mkc$1@bigred.inka.de> olaf@bigred.inka.de (Olaf Titz) writes:
>> Why low? I'm using -c1. The shorter the pauses, the merrier (I even
>> tried using -c0, but that didn't work, for some reason).
>I started with 50 and now use 10. The idea was to batch up a number of
>deletions and avoid spawning too many fastcancel processes, but of
>course that's a matter of tuning.
I revised the code to process once every 15 minutes.
===== make changes to c-nocem script manually =====
@@ -100,6 +104,8 @@
$SIG{"PIPE"}="shutdown";
$SIG{"TTOU"}="DEFAULT";
print "Starting $ID\n\n" unless ($opt_s);
+$lastruntime = time; # time of last batch run aka &deletethem
+$TIME_WAIT = 15 * 60; # wait this many seconds between batch runs
# Read the notice(s)
if ($opt_b || $opt_c) {
while ($file=<STDIN>, defined($file)) {
@@ -108,9 +114,11 @@
print STDOUT "File $file:\n" unless ($opt_s);
&procfile("<$file");
print STDOUT "\n" unless ($opt_s);
- if (--$m<0) {
+ if (--$m<0 || ((time - $lastruntime) > $TIME_WAIT)) {
+ # if read $opt_c filenames
&deletethem;
$m=($opt_c?$opt_c:99999999);
+ $lastruntime = time; # remember time of batch run
}
}
} else {
== END ==
--
Rahul Dhesi <dhesi@spams.r.us.com>
Technical Details
Message-ID:
<609or0$rb2$1@samba.rahul.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<342313F4.1C1530E4@shreve.net> <5vv4f9$cfc$1@defiant.cistron.nl> <60722e$dsf$1@zeus.fw.cuci.nl> <6083fs$mkc$1@bigred.inka.de>Show Full Headers
Complete Article Headers
Message-ID: <609or0$rb2$1@samba.rahul.net> Subject: Re: NoCem Messages Date: Wed, 24 Sep 1997 00:00:00 +0000 From: c.c.eiftj@78.usenet.us.com (Rahul Dhesi) References: <342313F4.1C1530E4@shreve.net> <5vv4f9$cfc$1@defiant.cistron.nl> <60722e$dsf$1@zeus.fw.cuci.nl> <6083fs$mkc$1@bigred.inka.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 274997318 Organization: a2i network X-Comment: Encoded From: line allows replies that preserve original subject NNTP-Posting-User: dhesi Newsgroups: news.software.nntp