4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-11-23 04:16:46 +01:00

Forcen new session id on single flag

This commit is contained in:
lash 2022-03-31 17:32:25 +00:00
parent 9df5f33fa0
commit 72f0e779c2
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -7,6 +7,7 @@ import logging
import os
import importlib
import uuid
import datetime
# external imports
from chainlib.chain import ChainSpec
@ -116,9 +117,9 @@ override(config, 'renderer', env=os.environ, args=args)
override(config, 'filter', env=os.environ, args=args)
if config.get('_SESSION_ID') == None:
if not config.get('_SINGLE'):
#config.add('_SESSION_ID', str(uuid.uuid4()), True)
#else:
if config.get('_SINGLE'):
config.add(str(uuid.uuid4()), '_SESSION_ID', True)
else:
config.add('default', '_SESSION_ID', True)
logg.debug('loaded config:\n{}'.format(config))
@ -257,7 +258,7 @@ def post_callback():
def block_callback(block, tx):
logg.debug('processing block {}'.format(block))
logg.info('processing {} {}'.format(block, datetime.datetime.fromtimestamp(block.timestamp)))
def main():