mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
Merge pull request #30 from trifle/master
allow zero warc_writer_threads
This commit is contained in:
commit
a8adaaf527
@ -176,7 +176,7 @@ class WarcproxController(object):
|
|||||||
assert(all(
|
assert(all(
|
||||||
wwt.dedup_db is self.warc_writer_threads[0].dedup_db
|
wwt.dedup_db is self.warc_writer_threads[0].dedup_db
|
||||||
for wwt in self.warc_writer_threads))
|
for wwt in self.warc_writer_threads))
|
||||||
if self.warc_writer_threads[0].dedup_db:
|
if any((t.dedup_db for t in self.warc_writer_threads)):
|
||||||
self.warc_writer_threads[0].dedup_db.start()
|
self.warc_writer_threads[0].dedup_db.start()
|
||||||
|
|
||||||
for wwt in self.warc_writer_threads:
|
for wwt in self.warc_writer_threads:
|
||||||
@ -211,7 +211,7 @@ class WarcproxController(object):
|
|||||||
|
|
||||||
if self.proxy.stats_db:
|
if self.proxy.stats_db:
|
||||||
self.proxy.stats_db.stop()
|
self.proxy.stats_db.stop()
|
||||||
if self.warc_writer_threads[0].dedup_db:
|
if any((t.dedup_db for t in self.warc_writer_threads)):
|
||||||
self.warc_writer_threads[0].dedup_db.close()
|
self.warc_writer_threads[0].dedup_db.close()
|
||||||
|
|
||||||
self.proxy_thread.join()
|
self.proxy_thread.join()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user