Remove redundant postgres connections in backend resume method
This commit is contained in:
parent
9bd61f71bb
commit
ea73d0082e
@ -199,11 +199,16 @@ class SyncerBackend:
|
||||
o = q.get(object_id)
|
||||
(highest_unsynced_block, highest_unsynced_index) = o.cursor()
|
||||
|
||||
for object_id in BlockchainSync.get_unsynced(session=session):
|
||||
object_ids = BlockchainSync.get_unsynced(session=session)
|
||||
session.close()
|
||||
|
||||
for object_id in object_ids:
|
||||
logg.debug('block syncer resume added previously unsynced sync entry id {}'.format(object_id))
|
||||
s = SyncerBackend(chain_spec, object_id)
|
||||
syncers.append(s)
|
||||
|
||||
session = SessionBase.create_session()
|
||||
|
||||
last_live_id = BlockchainSync.get_last(session=session)
|
||||
if last_live_id != None:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user