add CHAIN_POSITION support

This commit is contained in:
Barbara Miller 2018-02-14 17:55:09 -08:00
parent d5bf49e448
commit b3f08359e8

View File

@ -212,6 +212,8 @@ class WarcproxController(object):
self._postfetch_chain.append(
warcprox.ListenerPostfetchProcessor(
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:
self._postfetch_chain.append(plugin)