chaind-eth

Queue server for ethereum
Log | Files | Refs | README | LICENSE

commit ab1977b802e418e01f38b5588ee54897c7121719
parent 3d39fea7f876c0e3d3aa8430ed53de1ebea5b28e
Author: lash <dev@holbrook.no>
Date:   Tue, 26 Apr 2022 21:30:13 +0000

Apply queue-specific settings to tasker cli

Diffstat:
Mchaind/eth/runnable/tasker.py | 16++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/chaind/eth/runnable/tasker.py b/chaind/eth/runnable/tasker.py @@ -56,15 +56,11 @@ config.add('eth', 'CHAIND_ENGINE', False) logg.debug('config loaded:\n{}'.format(config)) -settings = ChaindEthSettings() +settings = ChaindEthSettings(include_queue=True) settings.process(config) logg.debug('settings:\n{}'.format(settings)) -import sys -sys.exit(0) - - def process_outgoing(chain_spec, adapter, rpc, limit=100): upcoming = adapter.upcoming() @@ -85,18 +81,18 @@ tx_normalizer = TxHexNormalizer().tx_hash token_cache_store = CacheTokenTx(chain_spec, normalizer=tx_normalizer) dispatcher = EthDispatcher(conn) queue_adapter = ChaindFsAdapter( - chain_spec, - config.get('SESSION_DATA_DIR'), + settings.get('CHAIN_SPEC'), + settings.get('SESSION_DATA_DIR'), EthCacheTx, dispatcher, ) -ctrl = SessionController(config, queue_adapter, process_outgoing) +ctrl = SessionController(settings, queue_adapter, process_outgoing) signal.signal(signal.SIGINT, ctrl.shutdown) signal.signal(signal.SIGTERM, ctrl.shutdown) -logg.info('session id is ' + config.get('SESSION_ID')) -logg.info('session socket path is ' + config.get('SESSION_SOCKET_PATH')) +logg.info('session id is ' + settings.get('SESSION_ID')) +logg.info('session socket path is ' + settings.get('SESSION_SOCKET_PATH')) def main(): while True: