mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
add CHAIN_POSITION support
This commit is contained in:
parent
46dd01de89
commit
982700d503
@ -212,6 +212,8 @@ class WarcproxController(object):
|
|||||||
self._postfetch_chain.append(
|
self._postfetch_chain.append(
|
||||||
warcprox.ListenerPostfetchProcessor(
|
warcprox.ListenerPostfetchProcessor(
|
||||||
plugin, self.options))
|
plugin, self.options))
|
||||||
|
elif hasattr(plugin, 'CHAIN_POSITION') and plugin.CHAIN_POSITION == 'early':
|
||||||
|
self._postfetch_chain.insert(0, plugin) # or insert early but later than 0?
|
||||||
else:
|
else:
|
||||||
self._postfetch_chain.append(plugin)
|
self._postfetch_chain.append(plugin)
|
||||||
|
|
||||||
|
@ -85,8 +85,8 @@ class WarcWriterProcessor(warcprox.BaseStandardPostfetchProcessor):
|
|||||||
if recorded_url.do_not_archive
|
if recorded_url.do_not_archive
|
||||||
else False)
|
else False)
|
||||||
# special warc name prefix '-' means "don't archive"
|
# special warc name prefix '-' means "don't archive"
|
||||||
return prefix != '-' and (not do_not_archive) and
|
return (prefix != '-' and (not do_not_archive)
|
||||||
self._filter_accepts(recorded_url)
|
and self._filter_accepts(recorded_url))
|
||||||
|
|
||||||
def _log(self, recorded_url, records):
|
def _log(self, recorded_url, records):
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user