Add session to create role eth task
This commit is contained in:
parent
42ae8e5ed3
commit
70f1d63867
@ -178,8 +178,10 @@ def register(self, account_address, chain_str, writer_address=None):
|
||||
"""
|
||||
chain_spec = ChainSpec.from_chain_str(chain_str)
|
||||
|
||||
session = SessionBase.create_session()
|
||||
if writer_address == None:
|
||||
writer_address = AccountRole.get_address('ACCOUNTS_INDEX_WRITER')
|
||||
writer_address = AccountRole.get_address('ACCOUNTS_INDEX_WRITER', session)
|
||||
session.close()
|
||||
|
||||
if writer_address == zero_address:
|
||||
raise RoleMissingError(account_address)
|
||||
|
@ -3,7 +3,6 @@ FROM node:15.3.0-alpine3.10
|
||||
WORKDIR /tmp/src/cic-meta
|
||||
|
||||
COPY cic-meta/package.json \
|
||||
cic-meta/package-lock.json \
|
||||
./
|
||||
|
||||
RUN npm install
|
||||
|
2
apps/cic-meta/package-lock.json
generated
2
apps/cic-meta/package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cic-client-meta",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7-alpha.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -6,7 +6,7 @@
|
||||
"types": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "mocha -r node_modules/node-localstorage/register -r ts-node/register tests/*.ts",
|
||||
"build": "node_modules/typescript/bin/tsc -d --outDir dist && npm run build-server",
|
||||
"build": "node_modules/typescript/bin/tsc -d --outDir dist",
|
||||
"build-server": "tsc -d --outDir dist-server scripts/server/*.ts",
|
||||
"pack": "node_modules/typescript/bin/tsc -d --outDir dist && webpack",
|
||||
"clean": "rm -rf dist",
|
||||
|
@ -49,7 +49,7 @@ This will monitor new mined blocks and send balances to the newly created accoun
|
||||
|
||||
Without any modifications to the cluster and config files:
|
||||
|
||||
`python -c config --redis-host-callback redis <datadir>`
|
||||
`python import_users.py -c config --redis-host-callback redis <datadir>`
|
||||
|
||||
** A note on the The callback**: The script uses a redis callback to retrieve the newly generated custodial address. This is the redis server _from the perspective of the cic-eth component_.
|
||||
|
||||
|
@ -191,7 +191,7 @@ class BlockGetter:
|
||||
|
||||
|
||||
def progress_callback(block_number, tx_index, s):
|
||||
sys.stdout.write(s.ljust(200) + "\n")
|
||||
sys.stdout.write(str(s).ljust(200) + "\n")
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user