mirror of
git://holbrook.no/eth-monitor.git
synced 2024-11-23 12:26:45 +01:00
Forcen new session id on single flag
This commit is contained in:
parent
9df5f33fa0
commit
72f0e779c2
@ -7,6 +7,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import importlib
|
import importlib
|
||||||
import uuid
|
import uuid
|
||||||
|
import datetime
|
||||||
|
|
||||||
# external imports
|
# external imports
|
||||||
from chainlib.chain import ChainSpec
|
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)
|
override(config, 'filter', env=os.environ, args=args)
|
||||||
|
|
||||||
if config.get('_SESSION_ID') == None:
|
if config.get('_SESSION_ID') == None:
|
||||||
if not config.get('_SINGLE'):
|
if config.get('_SINGLE'):
|
||||||
#config.add('_SESSION_ID', str(uuid.uuid4()), True)
|
config.add(str(uuid.uuid4()), '_SESSION_ID', True)
|
||||||
#else:
|
else:
|
||||||
config.add('default', '_SESSION_ID', True)
|
config.add('default', '_SESSION_ID', True)
|
||||||
logg.debug('loaded config:\n{}'.format(config))
|
logg.debug('loaded config:\n{}'.format(config))
|
||||||
|
|
||||||
@ -257,7 +258,7 @@ def post_callback():
|
|||||||
|
|
||||||
|
|
||||||
def block_callback(block, tx):
|
def block_callback(block, tx):
|
||||||
logg.debug('processing block {}'.format(block))
|
logg.info('processing {} {}'.format(block, datetime.datetime.fromtimestamp(block.timestamp)))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
Loading…
Reference in New Issue
Block a user