Defer processing backend error handling to parent
This commit is contained in:
parent
e31367853c
commit
42aa809500
@ -70,20 +70,12 @@ logg.debug('settings:\n{}'.format(settings))
|
|||||||
def process_outgoing(chain_spec, adapter, rpc, limit=50):
|
def process_outgoing(chain_spec, adapter, rpc, limit=50):
|
||||||
adapter = None
|
adapter = None
|
||||||
process_err = None
|
process_err = None
|
||||||
for i in range(2):
|
|
||||||
try:
|
|
||||||
adapter = ChaindFsAdapter(
|
adapter = ChaindFsAdapter(
|
||||||
settings.get('CHAIN_SPEC'),
|
settings.get('CHAIN_SPEC'),
|
||||||
settings.dir_for('queue'),
|
settings.dir_for('queue'),
|
||||||
EthCacheTx,
|
EthCacheTx,
|
||||||
dispatcher,
|
dispatcher,
|
||||||
)
|
)
|
||||||
except BackendIntegrityError as e:
|
|
||||||
process_err = e
|
|
||||||
continue
|
|
||||||
|
|
||||||
if adapter == None:
|
|
||||||
raise BackendIntegrityError(process_err)
|
|
||||||
|
|
||||||
upcoming = adapter.upcoming(limit=limit)
|
upcoming = adapter.upcoming(limit=limit)
|
||||||
logg.info('processor has {} candidates for {}, processing with limit {} adapter {} rpc {}'.format(len(upcoming), chain_spec, limit, adapter, rpc))
|
logg.info('processor has {} candidates for {}, processing with limit {} adapter {} rpc {}'.format(len(upcoming), chain_spec, limit, adapter, rpc))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
chaind~=0.2.0
|
chaind~=0.2.2
|
||||||
hexathon~=0.1.5
|
hexathon~=0.1.5
|
||||||
chainlib-eth~=0.1.1
|
chainlib-eth~=0.1.1
|
||||||
pyxdg~=0.27
|
pyxdg~=0.27
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = chaind-eth
|
name = chaind-eth
|
||||||
version = 0.2.0
|
version = 0.2.1
|
||||||
description = Queue server for ethereum
|
description = Queue server for ethereum
|
||||||
author = Louis Holbrook
|
author = Louis Holbrook
|
||||||
author_email = dev@holbrook.no
|
author_email = dev@holbrook.no
|
||||||
|
@ -11,7 +11,7 @@ from chainlib.chain import ChainSpec
|
|||||||
from chainqueue.cache import CacheTokenTx
|
from chainqueue.cache import CacheTokenTx
|
||||||
from chainlib.error import RPCException
|
from chainlib.error import RPCException
|
||||||
from chainlib.status import Status as TxStatus
|
from chainlib.status import Status as TxStatus
|
||||||
from chaind.unittest.common import TestChaindFsBase
|
from chaind.unittest.fs import TestChaindFsBase
|
||||||
from chaind.driver import QueueDriver
|
from chaind.driver import QueueDriver
|
||||||
from chaind.filter import StateFilter
|
from chaind.filter import StateFilter
|
||||||
from chainlib.eth.gas import Gas
|
from chainlib.eth.gas import Gas
|
||||||
|
Loading…
Reference in New Issue
Block a user