From 930faef213851401f9666e7e01da004549de8f77 Mon Sep 17 00:00:00 2001 From: nolash Date: Mon, 19 Jul 2021 12:47:17 +0200 Subject: [PATCH] Rehabilitate server runnable --- chaind_eth/data/config/config.ini | 2 +- chaind_eth/runnable/server.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/chaind_eth/data/config/config.ini b/chaind_eth/data/config/config.ini index 250b166..d8ce0d0 100644 --- a/chaind_eth/data/config/config.ini +++ b/chaind_eth/data/config/config.ini @@ -6,7 +6,7 @@ data_dir = [database] engine = -name = chaind_eth +name = chaind driver = user = password = diff --git a/chaind_eth/runnable/server.py b/chaind_eth/runnable/server.py index eb98854..79b0417 100644 --- a/chaind_eth/runnable/server.py +++ b/chaind_eth/runnable/server.py @@ -115,7 +115,7 @@ chain_spec = ChainSpec.from_chain_str(config.get('CHAIN_SPEC')) dsn = dsn_from_config(config) backend = SQLBackend(dsn, debug=config.true('DATABASE_DEBUG')) adapter = EthAdapter(backend) -rpc = EthHTTPConnection(url=config.get('RPC_ENDPOINT'), chain_spec=chain_spec) +rpc = EthHTTPConnection(url=config.get('RPC_HTTP_PROVIDER'), chain_spec=chain_spec) def process_outgoing(chain_spec, adapter, rpc): @@ -123,6 +123,7 @@ def process_outgoing(chain_spec, adapter, rpc): session = adapter.create_session() r = dispatcher.process(rpc, session) session.close() + return r def main(): @@ -143,7 +144,7 @@ def main(): break if srvs == None: logg.debug('timeout (remote socket is none)') - process_outgoing(chain_spec, adapter, rpc) + r = process_outgoing(chain_spec, adapter, rpc) if r > 0: ctrl.srv.settimeout(0.1) else: