Add chain reader arg flags to trackerd
This commit is contained in:
parent
7217cb7f46
commit
14ddab1b34
@ -17,4 +17,5 @@ class ArgumentParser(BaseArgumentParser):
|
|||||||
self.add_argument('--offset', type=int, help='Start block height for initial history sync')
|
self.add_argument('--offset', type=int, help='Start block height for initial history sync')
|
||||||
self.add_argument('--no-history', action='store_true', dest='no_history', help='Skip initial history sync')
|
self.add_argument('--no-history', action='store_true', dest='no_history', help='Skip initial history sync')
|
||||||
if local_arg_flags & CICFlag.CHAIN:
|
if local_arg_flags & CICFlag.CHAIN:
|
||||||
self.add_argument('-r', '--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
|
self.add_argument('--registry-address', type=str, dest='registry_address', help='CIC registry contract address')
|
||||||
|
self.add_argument('--trust-address', type=str, dest='trust_address', action='append', help='Add trust address')
|
||||||
|
@ -39,6 +39,9 @@ class Config(BaseConfig):
|
|||||||
|
|
||||||
if local_arg_flags & CICFlag.CHAIN:
|
if local_arg_flags & CICFlag.CHAIN:
|
||||||
local_args_override['CIC_REGISTRY_ADDRESS'] = getattr(args, 'registry_address')
|
local_args_override['CIC_REGISTRY_ADDRESS'] = getattr(args, 'registry_address')
|
||||||
|
trust_addresses = getattr(args, 'trust_address', None)
|
||||||
|
if trust_addresses != None:
|
||||||
|
local_args_override['CIC_TRUST_ADDRESS'] = ','.join(trust_addresses)
|
||||||
|
|
||||||
if local_arg_flags & CICFlag.CELERY:
|
if local_arg_flags & CICFlag.CELERY:
|
||||||
local_args_override['CELERY_QUEUE'] = getattr(args, 'celery_queue')
|
local_args_override['CELERY_QUEUE'] = getattr(args, 'celery_queue')
|
||||||
|
@ -40,7 +40,7 @@ logging.basicConfig(level=logging.WARNING)
|
|||||||
logg = logging.getLogger()
|
logg = logging.getLogger()
|
||||||
|
|
||||||
# process args
|
# process args
|
||||||
arg_flags = cic_cache.cli.argflag_std_base
|
arg_flags = cic_cache.cli.argflag_std_read
|
||||||
local_arg_flags = cic_cache.cli.argflag_local_sync
|
local_arg_flags = cic_cache.cli.argflag_local_sync
|
||||||
argparser = cic_cache.cli.ArgumentParser(arg_flags)
|
argparser = cic_cache.cli.ArgumentParser(arg_flags)
|
||||||
argparser.process_local_flags(local_arg_flags)
|
argparser.process_local_flags(local_arg_flags)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
alembic==1.4.2
|
alembic==1.4.2
|
||||||
confini>=0.3.6rc4,<0.5.0
|
confini~=0.4.2
|
||||||
uwsgi==2.0.19.1
|
uwsgi==2.0.19.1
|
||||||
moolb~=0.1.1b2
|
moolb~=0.1.1b2
|
||||||
cic-eth-registry~=0.6.1a1
|
cic-eth-registry~=0.6.1a1
|
||||||
@ -8,7 +8,7 @@ semver==2.13.0
|
|||||||
psycopg2==2.8.6
|
psycopg2==2.8.6
|
||||||
celery==4.4.7
|
celery==4.4.7
|
||||||
redis==3.5.3
|
redis==3.5.3
|
||||||
chainsyncer[sql]>=0.0.6a3,<0.1.0
|
chainsyncer[sql]>=0.0.7a3,<0.1.0
|
||||||
erc20-faucet>=0.3.2a2, <0.4.0
|
erc20-faucet>=0.3.2a2, <0.4.0
|
||||||
chainlib-eth>=0.0.9a14,<0.1.0
|
chainlib-eth>=0.0.10a20,<0.1.0
|
||||||
eth-address-index>=0.2.3a4,<0.3.0
|
eth-address-index>=0.2.3a4,<0.3.0
|
||||||
|
@ -36,7 +36,7 @@ if args.vv:
|
|||||||
elif args.v:
|
elif args.v:
|
||||||
logging.getLogger().setLevel(logging.INFO)
|
logging.getLogger().setLevel(logging.INFO)
|
||||||
|
|
||||||
config = confini.Config(configdir, args.env_prefix)
|
config = confini.Config(configdir, args.env_prefix, override_dirs=args.c)
|
||||||
config.process()
|
config.process()
|
||||||
config.censor('PASSWORD', 'DATABASE')
|
config.censor('PASSWORD', 'DATABASE')
|
||||||
config.censor('PASSWORD', 'SSL')
|
config.censor('PASSWORD', 'SSL')
|
||||||
|
Loading…
Reference in New Issue
Block a user