mirror of
https://github.com/adulau/wikirc2text.git
synced 2024-12-22 08:46:02 +00:00
State expiration updated
State expiration is only done when the --tail is in use.
This commit is contained in:
parent
8c022df990
commit
55fb31325d
1 changed files with 7 additions and 8 deletions
|
@ -75,6 +75,8 @@ def core ():
|
||||||
print rcline.encode('utf-8')
|
print rcline.encode('utf-8')
|
||||||
if x > 1:
|
if x > 1:
|
||||||
time.sleep(float(options.wait))
|
time.sleep(float(options.wait))
|
||||||
|
if options.statesec is not None:
|
||||||
|
expirecache(options.statesec)
|
||||||
|
|
||||||
if (options.state):
|
if (options.state):
|
||||||
s.close()
|
s.close()
|
||||||
|
@ -91,10 +93,7 @@ def expirecache (seconds):
|
||||||
sdeleted=sdeleted+1
|
sdeleted=sdeleted+1
|
||||||
|
|
||||||
s.close()
|
s.close()
|
||||||
print "%s states deleted" % str(sdeleted)
|
log = "%s states deleted" % str(sdeleted)
|
||||||
|
sys.stderr.write(log)
|
||||||
if not options.statesec:
|
|
||||||
core()
|
|
||||||
else:
|
|
||||||
expirecache(options.statesec)
|
|
||||||
|
|
||||||
|
core()
|
||||||
|
|
Loading…
Reference in a new issue