Rehabilitate tagger

This commit is contained in:
nolash 2021-11-06 15:09:27 +01:00
parent 6f1bf1ba1f
commit be3bf81148
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
4 changed files with 5 additions and 8 deletions

View File

@ -82,9 +82,10 @@ class CmdCtrl:
self.rpc = chainlib.eth.cli.Rpc()
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):

View File

@ -36,6 +36,6 @@ def validate(config, args):
def execute(ctrl):
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.stick(ctrl.get('_IDENTIFIER'))

View File

@ -6,7 +6,6 @@ import datetime
# external imports
from cic_eth_registry import CICRegistry
from cic_eth_registry.lookup.tokenindex import TokenIndexLookup
from cic_types.ext.metadata import MetadataRequestsHandler
from cic_types.models.person import Person
from chainlib.eth.address import to_checksum_address
from hexathon import add_0x
@ -51,8 +50,6 @@ def validate(config, args):
def execute(ctrl):
tx_getter = TxGetter(ctrl.get('TX_CACHE_URL'))
MetadataRequestsHandler.base_url = ctrl.get('META_URL')
store_path = '.clicada'
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')))

View File

@ -211,7 +211,6 @@ class FileUserStore:
try:
person_data = person.deserialize(person_data=v)
except Exception as e:
logg.error('e {}'.format(e))
person_data = v
return person_data
except FileNotFoundError: