fix: set logging to silent to remove annoying shell scrolling

This commit is contained in:
henrikvilhelmberglund 2026-01-11 19:41:05 +01:00
parent 5d0112f768
commit 742960dde5
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.")
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
uri = f'{base_url}/nodes'
@ -78,12 +78,14 @@ async def _get_cnr_data(cache_mode=True, dont_wait=True):
full_nodes[x['id']] = x
if page % 5 == 0:
print(f"FETCH ComfyRegistry Data: {page}/{sub_json_obj['totalPages']}")
if not silent:
print(f"FETCH ComfyRegistry Data: {page}/{sub_json_obj['totalPages']}")
page += 1
time.sleep(0.5)
print("FETCH ComfyRegistry Data [DONE]")
if not silent:
print("FETCH ComfyRegistry Data [DONE]")
for v in full_nodes.values():
if 'latest_version' not in v:

View File

@ -178,7 +178,7 @@ def is_file_created_within_one_day(file_path):
return time_difference <= 86400
async def get_data(uri, silent=False):
async def get_data(uri, silent=True):
if not silent:
print(f"FETCH DATA from: {uri}", end="")
@ -225,7 +225,7 @@ def get_cache_state(uri):
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)
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}")
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)
if cache_mode and dont_wait: