fix: More code cleanup
All checks were successful
Build Docker / Build Image (push) Successful in 2m9s
All checks were successful
Build Docker / Build Image (push) Successful in 2m9s
This commit is contained in:
@@ -7,10 +7,8 @@ import os
|
|||||||
from handywrapper import api
|
from handywrapper import api
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
HSD_API = os.getenv("HSD_API")
|
HSD_API = os.getenv("HSD_API","")
|
||||||
HSD_IP = os.getenv("HSD_IP")
|
HSD_IP = os.getenv("HSD_IP","localhost")
|
||||||
if HSD_IP is None:
|
|
||||||
HSD_IP = "localhost"
|
|
||||||
|
|
||||||
HSD_NETWORK = os.getenv("HSD_NETWORK")
|
HSD_NETWORK = os.getenv("HSD_NETWORK")
|
||||||
HSD_WALLET_PORT = 12039
|
HSD_WALLET_PORT = 12039
|
||||||
@@ -560,7 +558,6 @@ def renderDomainAsync(namehash: str) -> None:
|
|||||||
|
|
||||||
if namehash in cache:
|
if namehash in cache:
|
||||||
return
|
return
|
||||||
|
|
||||||
# Fetch the name outside the lock (network call)
|
# Fetch the name outside the lock (network call)
|
||||||
name = hsd.rpc_getNameByHash(namehash)
|
name = hsd.rpc_getNameByHash(namehash)
|
||||||
if name["error"] is None:
|
if name["error"] is None:
|
||||||
@@ -576,7 +573,7 @@ def renderDomainAsync(namehash: str) -> None:
|
|||||||
with open(NAMEHASH_CACHE, 'w') as f:
|
with open(NAMEHASH_CACHE, 'w') as f:
|
||||||
json.dump(cache, f)
|
json.dump(cache, f)
|
||||||
|
|
||||||
return rendered
|
return
|
||||||
else:
|
else:
|
||||||
print(f"Error fetching name for hash {namehash}: {name['error']}", flush=True)
|
print(f"Error fetching name for hash {namehash}: {name['error']}", flush=True)
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ def gunicornServer():
|
|||||||
|
|
||||||
def load_config(self):
|
def load_config(self):
|
||||||
for key, value in self.options.items():
|
for key, value in self.options.items():
|
||||||
if key in self.cfg.settings and value is not None:
|
if key in self.cfg.settings and value is not None: # type: ignore
|
||||||
self.cfg.set(key.lower(), value)
|
self.cfg.set(key.lower(), value) # type: ignore
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
return self.application
|
return self.application
|
||||||
|
|||||||
Reference in New Issue
Block a user