From bb941acd7e278fcffafbe710e4665036f3343899 Mon Sep 17 00:00:00 2001 From: nolash Date: Tue, 13 Apr 2021 15:31:40 +0200 Subject: [PATCH] Fix missing history syncer in cic-cache-tracker --- apps/cic-cache/cic_cache/runnable/daemons/tracker.py | 7 +++++-- apps/cic-cache/requirements.txt | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/cic-cache/cic_cache/runnable/daemons/tracker.py b/apps/cic-cache/cic_cache/runnable/daemons/tracker.py index 9537dfb4..cee54144 100644 --- a/apps/cic-cache/cic_cache/runnable/daemons/tracker.py +++ b/apps/cic-cache/cic_cache/runnable/daemons/tracker.py @@ -29,6 +29,7 @@ from hexathon import ( from chainsyncer.backend import SyncerBackend from chainsyncer.driver import ( HeadSyncer, + HistorySyncer, ) from chainsyncer.db.models.base import SessionBase @@ -76,13 +77,15 @@ def main(): if len(syncer_backends) == 0: logg.info('found no backends to resume') - syncer_backends.append(SyncerBackend.initial(chain_spec, block_offset)) + syncers.append(SyncerBackend.initial(chain_spec, block_offset)) else: for syncer_backend in syncer_backends: logg.info('resuming sync session {}'.format(syncer_backend)) - syncer_backends.append(SyncerBackend.live(chain_spec, block_offset+1)) + for syncer_backend in syncer_backends: + syncers.append(HistorySyncer(syncer_backend)) + syncer_backend = SyncerBackend.live(chain_spec, block_offset+1) syncers.append(HeadSyncer(syncer_backend)) trusted_addresses_src = config.get('CIC_TRUST_ADDRESS') diff --git a/apps/cic-cache/requirements.txt b/apps/cic-cache/requirements.txt index 95fa8ac1..5669eb42 100644 --- a/apps/cic-cache/requirements.txt +++ b/apps/cic-cache/requirements.txt @@ -1,13 +1,13 @@ -cic-base~=0.1.2a62 +cic-base~=0.1.2a66 alembic==1.4.2 confini~=0.3.6rc3 uwsgi==2.0.19.1 moolb~=0.1.0 -cic-eth-registry~=0.5.4a12 +cic-eth-registry~=0.5.4a13 SQLAlchemy==1.3.20 semver==2.13.0 psycopg2==2.8.6 celery==4.4.7 redis==3.5.3 -chainlib~=0.0.2a5 -chainsyncer~=0.0.1a21 +chainlib~=0.0.2a10 +chainsyncer[sql]~=0.0.2a1