mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Hoist the iwc import in refresh_iwc_manifest to module top
The local import claimed to keep cachetools/requests out of celery's startup graph, but cachetools is already pulled in transitively (NotificationManager -> sse_dispatch) and requests is resident in any worker that boots galaxy.app. There's no circular-import risk either, and the sibling refresh_gtn_database imports GTNSearchDB at the top -- so hoist this one for consistency and drop the comment.
This commit is contained in:
@@ -26,6 +26,7 @@ from sqlalchemy import (
|
||||
)
|
||||
|
||||
from galaxy import model
|
||||
from galaxy.agents import iwc
|
||||
from galaxy.agents.gtn import GTNSearchDB
|
||||
from galaxy.celery import (
|
||||
celery_app,
|
||||
@@ -840,11 +841,6 @@ def refresh_iwc_manifest(config: GalaxyAppConfiguration):
|
||||
so an iwc.galaxyproject.org outage doesn't kill the periodic queue --
|
||||
on-demand callers still get the prior cached copy until the TTL lapses.
|
||||
"""
|
||||
# Local import keeps the iwc module (and its cachetools / requests
|
||||
# imports) out of celery's startup graph -- they only load on the
|
||||
# workers that actually run this task.
|
||||
from galaxy.agents import iwc
|
||||
|
||||
try:
|
||||
manifest = iwc.refresh_manifest()
|
||||
except Exception as e: # noqa: BLE001 -- best-effort warm; resilience over precision
|
||||
|
||||
Reference in New Issue
Block a user