This commit is contained in:
Henrik Berglund 2026-01-13 07:08:50 +00:00 committed by GitHub
commit 467d8ef74a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 6 deletions

View File

@ -25,7 +25,7 @@ async def get_cnr_data(cache_mode=True, dont_wait=True):
print("A timeout occurred during the fetch process from ComfyRegistry.") print("A timeout occurred during the fetch process from ComfyRegistry.")
return await _get_cnr_data(cache_mode=True, dont_wait=True) # timeout fallback return await _get_cnr_data(cache_mode=True, dont_wait=True) # timeout fallback
async def _get_cnr_data(cache_mode=True, dont_wait=True): async def _get_cnr_data(cache_mode=True, dont_wait=True, silent=True):
global is_cache_loading global is_cache_loading
uri = f'{base_url}/nodes' uri = f'{base_url}/nodes'
@ -78,11 +78,13 @@ async def _get_cnr_data(cache_mode=True, dont_wait=True):
full_nodes[x['id']] = x full_nodes[x['id']] = x
if page % 5 == 0: if page % 5 == 0:
if not silent:
print(f"FETCH ComfyRegistry Data: {page}/{sub_json_obj['totalPages']}") print(f"FETCH ComfyRegistry Data: {page}/{sub_json_obj['totalPages']}")
page += 1 page += 1
time.sleep(0.5) time.sleep(0.5)
if not silent:
print("FETCH ComfyRegistry Data [DONE]") print("FETCH ComfyRegistry Data [DONE]")
for v in full_nodes.values(): for v in full_nodes.values():

View File

@ -178,7 +178,7 @@ def is_file_created_within_one_day(file_path):
return time_difference <= 86400 return time_difference <= 86400
async def get_data(uri, silent=False): async def get_data(uri, silent=True):
if not silent: if not silent:
print(f"FETCH DATA from: {uri}", end="") print(f"FETCH DATA from: {uri}", end="")
@ -225,7 +225,7 @@ def get_cache_state(uri):
return "expired" return "expired"
def save_to_cache(uri, json_obj, silent=False): def save_to_cache(uri, json_obj, silent=True):
cache_uri = get_cache_path(uri) cache_uri = get_cache_path(uri)
with cache_lock: with cache_lock:
@ -235,7 +235,7 @@ def save_to_cache(uri, json_obj, silent=False):
logging.info(f"[ComfyUI-Manager] default cache updated: {uri}") logging.info(f"[ComfyUI-Manager] default cache updated: {uri}")
async def get_data_with_cache(uri, silent=False, cache_mode=True, dont_wait=False, dont_cache=False): async def get_data_with_cache(uri, silent=True, cache_mode=True, dont_wait=False, dont_cache=False):
cache_uri = get_cache_path(uri) cache_uri = get_cache_path(uri)
if cache_mode and dont_wait: if cache_mode and dont_wait: