Faster incoming/outgoing transaction checking

This commit is contained in:
Sander Ferdinand 2018-10-20 13:28:01 +02:00
parent 523fa1c569
commit 0902acf633
No known key found for this signature in database
GPG key ID: 7BBC83D7A8810AAB
2 changed files with 3 additions and 3 deletions

View file

@ -57,5 +57,5 @@ class WowCache:
except:
return {}
def set(self, key: str, data: dict, expiry = 300):
def set(self, key: str, data: dict, expiry=300):
self._cache.set(key, json.dumps(data, default=json_encoder), ex=expiry)

View file

@ -196,7 +196,7 @@ class Proposal(base):
if not isinstance(data, dict):
print('error; get_transfers_in; %d' % self.id)
return rtn
cache.set(cache_key, data=data, expiry=300)
cache.set(cache_key, data=data, expiry=60)
except Exception as ex:
print('error; get_transfers_in; %d' % self.id)
return rtn
@ -241,7 +241,7 @@ class Proposal(base):
if not isinstance(data, dict):
print('error; get_transfers_out; %d' % self.id)
return rtn
cache.set(cache_key, data=data, expiry=300)
cache.set(cache_key, data=data, expiry=60)
except:
print('error; get_transfers_out; %d' % self.id)
return rtn