mirror of
git://holbrook.no/eth-monitor.git
synced 2024-11-22 04:16:45 +01:00
Implement 'fresh' flag
This commit is contained in:
parent
aabc632d8d
commit
c760c3800c
@ -359,14 +359,17 @@ def main():
|
|||||||
out_filter = OutFilter(chain_spec, rules_filter=address_rules, renderers=renderers_mods)
|
out_filter = OutFilter(chain_spec, rules_filter=address_rules, renderers=renderers_mods)
|
||||||
filters.append(out_filter)
|
filters.append(out_filter)
|
||||||
|
|
||||||
cache_rpc = CacheRPC(rpc, store)
|
use_rpc = rpc
|
||||||
|
if not args.fresh:
|
||||||
|
use_rpc = CacheRPC(rpc, store)
|
||||||
|
|
||||||
i = 0
|
i = 0
|
||||||
for syncer in syncers:
|
for syncer in syncers:
|
||||||
logg.info('running syncer index {} {}'.format(i, str(syncer)))
|
logg.info('running syncer index {} {}'.format(i, str(syncer)))
|
||||||
for f in filters:
|
for f in filters:
|
||||||
syncer.add_filter(f)
|
syncer.add_filter(f)
|
||||||
|
|
||||||
r = syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')), cache_rpc)
|
r = syncer.loop(int(config.get('SYNCER_LOOP_INTERVAL')), use_rpc)
|
||||||
sys.stderr.write("sync {} done at block {}\n".format(syncer, r))
|
sys.stderr.write("sync {} done at block {}\n".format(syncer, r))
|
||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
|
Loading…
Reference in New Issue
Block a user