Rehabilitate tagger
This commit is contained in:
parent
6f1bf1ba1f
commit
be3bf81148
@ -82,9 +82,10 @@ class CmdCtrl:
|
|||||||
self.rpc = chainlib.eth.cli.Rpc()
|
self.rpc = chainlib.eth.cli.Rpc()
|
||||||
self.__conn = self.rpc.connect_by_config(self.config)
|
self.__conn = self.rpc.connect_by_config(self.config)
|
||||||
|
|
||||||
self.remote_openers = {
|
|
||||||
'meta': HTTPSession(self.get('META_URL'), auth=self.__auth),
|
self.remote_openers = {}
|
||||||
}
|
if self.get('META_URL') != None:
|
||||||
|
self.remote_openers['meta'] = HTTPSession(self.get('META_URL'), auth=self.__auth)
|
||||||
|
|
||||||
|
|
||||||
def auth(self, typ):
|
def auth(self, typ):
|
||||||
|
@ -36,6 +36,6 @@ def validate(config, args):
|
|||||||
|
|
||||||
def execute(ctrl):
|
def execute(ctrl):
|
||||||
store_path = '.clicada'
|
store_path = '.clicada'
|
||||||
user_store = FileUserStore(ctrl.chain(), ctrl.get('_CATEGORY'), store_path, int(ctrl.get('FILESTORE_TTL')))
|
user_store = FileUserStore(None, ctrl.chain(), ctrl.get('_CATEGORY'), store_path, int(ctrl.get('FILESTORE_TTL')))
|
||||||
user_store.put(ctrl.get('_IDENTIFIER'), json.dumps(ctrl.get('_TAG')), force=True)
|
user_store.put(ctrl.get('_IDENTIFIER'), json.dumps(ctrl.get('_TAG')), force=True)
|
||||||
user_store.stick(ctrl.get('_IDENTIFIER'))
|
user_store.stick(ctrl.get('_IDENTIFIER'))
|
||||||
|
@ -6,7 +6,6 @@ import datetime
|
|||||||
# external imports
|
# external imports
|
||||||
from cic_eth_registry import CICRegistry
|
from cic_eth_registry import CICRegistry
|
||||||
from cic_eth_registry.lookup.tokenindex import TokenIndexLookup
|
from cic_eth_registry.lookup.tokenindex import TokenIndexLookup
|
||||||
from cic_types.ext.metadata import MetadataRequestsHandler
|
|
||||||
from cic_types.models.person import Person
|
from cic_types.models.person import Person
|
||||||
from chainlib.eth.address import to_checksum_address
|
from chainlib.eth.address import to_checksum_address
|
||||||
from hexathon import add_0x
|
from hexathon import add_0x
|
||||||
@ -51,8 +50,6 @@ def validate(config, args):
|
|||||||
def execute(ctrl):
|
def execute(ctrl):
|
||||||
tx_getter = TxGetter(ctrl.get('TX_CACHE_URL'))
|
tx_getter = TxGetter(ctrl.get('TX_CACHE_URL'))
|
||||||
|
|
||||||
MetadataRequestsHandler.base_url = ctrl.get('META_URL')
|
|
||||||
|
|
||||||
store_path = '.clicada'
|
store_path = '.clicada'
|
||||||
user_phone_file_label = 'phone'
|
user_phone_file_label = 'phone'
|
||||||
user_phone_store = FileUserStore(ctrl.opener('meta'), ctrl.chain(), user_phone_file_label, store_path, int(ctrl.get('FILESTORE_TTL')))
|
user_phone_store = FileUserStore(ctrl.opener('meta'), ctrl.chain(), user_phone_file_label, store_path, int(ctrl.get('FILESTORE_TTL')))
|
||||||
|
@ -211,7 +211,6 @@ class FileUserStore:
|
|||||||
try:
|
try:
|
||||||
person_data = person.deserialize(person_data=v)
|
person_data = person.deserialize(person_data=v)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logg.error('e {}'.format(e))
|
|
||||||
person_data = v
|
person_data = v
|
||||||
return person_data
|
return person_data
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
|
Loading…
Reference in New Issue
Block a user