Handle single dict input to account tx list, add ext module to tasker
This commit is contained in:
		
							parent
							
								
									3ceafa90f4
								
							
						
					
					
						commit
						9119c04f1f
					
				@ -490,7 +490,7 @@ class Api:
 | 
			
		||||
            queue=self.queue,
 | 
			
		||||
            )
 | 
			
		||||
        if self.callback_param != None:
 | 
			
		||||
            s_assemble.link(self.callback_success).on_error(self.callback_error)
 | 
			
		||||
            s_brief.link(self.callback_success).on_error(self.callback_error)
 | 
			
		||||
 | 
			
		||||
        t = None
 | 
			
		||||
        if external_task != None:
 | 
			
		||||
@ -515,7 +515,8 @@ class Api:
 | 
			
		||||
            c = celery.chain(s_external_get, s_external_process)
 | 
			
		||||
            t = celery.chord([s_local, c])(s_brief)
 | 
			
		||||
        else:
 | 
			
		||||
            t = s_local.apply_sync()
 | 
			
		||||
            s_local.link(s_brief)
 | 
			
		||||
            t = s_local.apply_async()
 | 
			
		||||
 | 
			
		||||
        return t
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -149,6 +149,9 @@ def tx_collate(tx_batches, chain_str, offset, limit, newest_first=True):
 | 
			
		||||
    txs_by_block = {}
 | 
			
		||||
    chain_spec = ChainSpec.from_chain_str(chain_str)
 | 
			
		||||
 | 
			
		||||
    if isinstance(tx_batches, dict):
 | 
			
		||||
        tx_batches = [tx_batches]
 | 
			
		||||
 | 
			
		||||
    for b in tx_batches:
 | 
			
		||||
        for v in b.values():
 | 
			
		||||
            tx = None
 | 
			
		||||
 | 
			
		||||
@ -40,6 +40,8 @@ from cic_eth.callbacks import redis
 | 
			
		||||
from cic_eth.db.models.base import SessionBase
 | 
			
		||||
from cic_eth.db.models.otx import Otx
 | 
			
		||||
from cic_eth.db import dsn_from_config
 | 
			
		||||
from cic_eth.ext import tx
 | 
			
		||||
from cic_eth.ext import address
 | 
			
		||||
 | 
			
		||||
logging.basicConfig(level=logging.WARNING)
 | 
			
		||||
logg = logging.getLogger()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user