diff --git a/apps/cic-eth/cic_eth/admin/ctrl.py b/apps/cic-eth/cic_eth/admin/ctrl.py index 5c9d769c..1868238e 100644 --- a/apps/cic-eth/cic_eth/admin/ctrl.py +++ b/apps/cic-eth/cic_eth/admin/ctrl.py @@ -10,12 +10,15 @@ from cic_registry import zero_address from cic_eth.db.enum import LockEnum from cic_eth.db.models.base import SessionBase from cic_eth.db.models.lock import Lock +from cic_eth.task import ( + CriticalSQLAlchemyTask, + ) from cic_eth.error import LockedError celery_app = celery.current_app logg = logging.getLogger() -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def lock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL, tx_hash=None): """Task wrapper to set arbitrary locks @@ -33,7 +36,7 @@ def lock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL, tx_ return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def unlock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL): """Task wrapper to reset arbitrary locks @@ -51,7 +54,7 @@ def unlock(chained_input, chain_str, address=zero_address, flags=LockEnum.ALL): return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def lock_send(chained_input, chain_str, address=zero_address, tx_hash=None): """Task wrapper to set send lock @@ -67,7 +70,7 @@ def lock_send(chained_input, chain_str, address=zero_address, tx_hash=None): return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def unlock_send(chained_input, chain_str, address=zero_address): """Task wrapper to reset send lock @@ -83,7 +86,7 @@ def unlock_send(chained_input, chain_str, address=zero_address): return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def lock_queue(chained_input, chain_str, address=zero_address, tx_hash=None): """Task wrapper to set queue direct lock @@ -99,7 +102,7 @@ def lock_queue(chained_input, chain_str, address=zero_address, tx_hash=None): return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def unlock_queue(chained_input, chain_str, address=zero_address): """Task wrapper to reset queue direct lock @@ -115,7 +118,7 @@ def unlock_queue(chained_input, chain_str, address=zero_address): return chained_input -@celery_app.task() +@celery_app.task(base=CriticalSQLAlchemyTask) def check_lock(chained_input, chain_str, lock_flags, address=None): session = SessionBase.create_session() r = Lock.check(chain_str, lock_flags, address=zero_address, session=session) diff --git a/apps/cic-eth/cic_eth/eth/tx.py b/apps/cic-eth/cic_eth/eth/tx.py index cba670ce..f38538c3 100644 --- a/apps/cic-eth/cic_eth/eth/tx.py +++ b/apps/cic-eth/cic_eth/eth/tx.py @@ -14,6 +14,7 @@ from cic_eth.db import Otx, SessionBase from cic_eth.db.models.tx import TxCache from cic_eth.db.models.nonce import NonceReservation from cic_eth.db.models.lock import Lock +from cic_eth.db.models.role import AccountRole from cic_eth.db.enum import ( LockEnum, StatusBits, diff --git a/apps/contract-migration/scripts/import_users.py b/apps/contract-migration/scripts/import_users.py index 2acede2f..3cd0e09f 100644 --- a/apps/contract-migration/scripts/import_users.py +++ b/apps/contract-migration/scripts/import_users.py @@ -97,6 +97,7 @@ def register_eth(i, u): callback_queue=args.q, ) t = api.create_account(register=True) + logg.debug('register {} -> {}'.format(u, t)) while True: ps.get_message() diff --git a/apps/contract-migration/scripts/requirements.txt b/apps/contract-migration/scripts/requirements.txt index 8b735fdd..b16cc544 100644 --- a/apps/contract-migration/scripts/requirements.txt +++ b/apps/contract-migration/scripts/requirements.txt @@ -1,3 +1,3 @@ cic-base[full_graph]==0.1.1a23 -cic-eth==0.10.0a40 +cic-eth==0.10.0a41 cic-types==0.1.0a8 diff --git a/apps/contract-migration/seed_cic_eth.sh b/apps/contract-migration/seed_cic_eth.sh index 8beaea58..d59efefa 100644 --- a/apps/contract-migration/seed_cic_eth.sh +++ b/apps/contract-migration/seed_cic_eth.sh @@ -31,7 +31,7 @@ set -e set -a # We need to not install these here... -pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a40 chainlib==0.0.1a21 cic-contracts==0.0.2a2 +pip install --extra-index-url $DEV_PIP_EXTRA_INDEX_URL cic-eth==0.10.0a41 chainlib==0.0.1a21 cic-contracts==0.0.2a2 >&2 echo "create account for gas gifter" old_gas_provider=$DEV_ETH_ACCOUNT_GAS_PROVIDER