revert back to celery.chain

This commit is contained in:
William Luke 2021-12-02 16:36:19 +03:00
parent d3805022ff
commit 6fb903d37b

View File

@ -434,7 +434,7 @@ class Api(ApiBase):
:param address: Ethereum address of holder :param address: Ethereum address of holder
:type address: str, 0x-hex :type address: str, 0x-hex
:param token_symbol: ERC20 token symbol of tokens to send :param token_symbol: ERC20 token symbol of token to send
:type token_symbol: str :type token_symbol: str
:param include_pending: If set, will include transactions that have not yet been fully processed :param include_pending: If set, will include transactions that have not yet been fully processed
:type include_pending: bool :type include_pending: bool
@ -488,9 +488,9 @@ class Api(ApiBase):
s_balance_incoming.link(s_balance_outgoing) s_balance_incoming.link(s_balance_outgoing)
last_in_chain = s_balance_outgoing last_in_chain = s_balance_outgoing
one = s_tokens | s_balance one = celery.chain(s_tokens, s_balance)
two = s_tokens | s_balance_incoming two = celery.chain(s_tokens, s_balance_incoming)
three = s_tokens | s_balance_outgoing three = celery.chain(s_tokens, s_balance_outgoing)
t = None t = None
if self.callback_param != None: if self.callback_param != None:
@ -500,7 +500,7 @@ class Api(ApiBase):
t = celery.chord([one, two, three])(s_result) t = celery.chord([one, two, three])(s_result)
else: else:
# TODO: Chord is inefficient with only one chain, but assemble_balances must be able to handle different structures in order to avoid chord # TODO: Chord is inefficient with only one chain, but assemble_balances must be able to handle different structures in order to avoid chord
one = s_tokens | s_balance one = celery.chain(s_tokens, s_balance)
if self.callback_param != None: if self.callback_param != None:
s_result.link(self.callback_success).on_error(self.callback_error) s_result.link(self.callback_success).on_error(self.callback_error)
t = celery.chord([one])(s_result) t = celery.chord([one])(s_result)