Handle missing context key arg

This commit is contained in:
lash 2023-08-07 12:48:23 +01:00
parent 39ee38b0dc
commit 3dee984eb9
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
5 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,5 @@
- 0.8.2
* Handle undefined content-key argument
- 0.8.1 - 0.8.1
* Implement syncer context * Implement syncer context
* Add key-value parameter for cli, environment, config to pass to syncer context * Add key-value parameter for cli, environment, config to pass to syncer context

View File

@ -96,7 +96,6 @@ logg.debug('loaded settings:\n{}'.format(settings))
def main(): def main():
logg.info('session is {}'.format(settings.get('SESSION_ID'))) logg.info('session is {}'.format(settings.get('SESSION_ID')))
drv = ChainInterfaceDriver( drv = ChainInterfaceDriver(
settings.get('SYNC_STORE'), settings.get('SYNC_STORE'),
settings.get('SYNCER_INTERFACE'), settings.get('SYNCER_INTERFACE'),

View File

@ -382,9 +382,11 @@ def process_cache(settings, config):
def process_user_context(settings, config): def process_user_context(settings, config):
ctx_usr = {} ctx_usr = {}
for kv in config.get('ETHMONITOR_CONTEXT_KEY'): ks = config.get('ETHMONITOR_CONTEXT_KEY')
(k, v) = kv.split('=', 1) if ks != None:
ctx_usr[k] = v for kv in ks:
(k, v) = kv.split('=', 1)
ctx_usr[k] = v
ctx = { ctx = {
'driver': 'eth-monitor', 'driver': 'eth-monitor',
'usr': ctx_usr, 'usr': ctx_usr,

View File

@ -1,6 +1,6 @@
chainlib-eth~=0.5.0 chainlib-eth~=0.5.0
chainlib~=0.5.0 chainlib~=0.5.0
chainsyncer~=0.8.1 chainsyncer~=0.8.2
leveldir~=0.3.0 leveldir~=0.3.0
eth-cache~=0.3.0 eth-cache~=0.3.0
confini~=0.6.3 confini~=0.6.3

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = eth-monitor name = eth-monitor
version = 0.8.1 version = 0.8.2
description = Monitor and cache transactions using match filters description = Monitor and cache transactions using match filters
author = Louis Holbrook author = Louis Holbrook
author_email = dev@holbrook.no author_email = dev@holbrook.no