mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-05 01:07:37 +08:00
Improve asset scanner logging
- Add log when scanner start is requested and when skipped due to already running - Remove noisy 'no mime_type' info log (expected during fast stub phase) Amp-Thread-ID: https://ampcode.com/threads/T-019c4f56-3fe1-72cb-888a-3ac4ac99b3d7 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
parent
b89e5de40e
commit
b407a80d5a
@ -118,8 +118,10 @@ class AssetSeeder:
|
|||||||
Returns:
|
Returns:
|
||||||
True if scan was started, False if already running
|
True if scan was started, False if already running
|
||||||
"""
|
"""
|
||||||
|
logging.info("Asset seeder start requested (roots=%s, phase=%s)", roots, phase.value)
|
||||||
with self._lock:
|
with self._lock:
|
||||||
if self._state != State.IDLE:
|
if self._state != State.IDLE:
|
||||||
|
logging.info("Asset seeder already running, skipping start")
|
||||||
return False
|
return False
|
||||||
self._state = State.RUNNING
|
self._state = State.RUNNING
|
||||||
self._progress = Progress()
|
self._progress = Progress()
|
||||||
|
|||||||
@ -165,8 +165,6 @@ def batch_insert_seed_assets(
|
|||||||
path_to_asset_id[absolute_path] = asset_id
|
path_to_asset_id[absolute_path] = asset_id
|
||||||
|
|
||||||
mime_type = spec.get("mime_type")
|
mime_type = spec.get("mime_type")
|
||||||
if mime_type is None:
|
|
||||||
logging.info("batch_insert_seed_assets: no mime_type for %s", absolute_path)
|
|
||||||
asset_rows.append(
|
asset_rows.append(
|
||||||
{
|
{
|
||||||
"id": asset_id,
|
"id": asset_id,
|
||||||
|
|||||||
6
main.py
6
main.py
@ -258,7 +258,11 @@ def prompt_worker(q, server_instance):
|
|||||||
for k in sensitive:
|
for k in sensitive:
|
||||||
extra_data[k] = sensitive[k]
|
extra_data[k] = sensitive[k]
|
||||||
|
|
||||||
e.execute(item[2], prompt_id, extra_data, item[4])
|
asset_seeder.pause()
|
||||||
|
try:
|
||||||
|
e.execute(item[2], prompt_id, extra_data, item[4])
|
||||||
|
finally:
|
||||||
|
asset_seeder.resume()
|
||||||
need_gc = True
|
need_gc = True
|
||||||
|
|
||||||
remove_sensitive = lambda prompt: prompt[:5] + prompt[6:]
|
remove_sensitive = lambda prompt: prompt[:5] + prompt[6:]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user