fix(arch-038,arch-054): register_event_handlers hook in BasePlugin; entity model lookup matches registry shape
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -97,6 +97,15 @@ class BasePlugin(ABC):
|
|||||||
"""
|
"""
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
async def register_event_handlers(self, event_bus: EventBus) -> None:
|
||||||
|
"""Register event handlers for the background worker (ARCH-038 hook).
|
||||||
|
|
||||||
|
The worker calls this on every active plugin at startup so plugins
|
||||||
|
can subscribe to events even when the web process is separate.
|
||||||
|
Default: no-op. Override to subscribe handlers.
|
||||||
|
"""
|
||||||
|
return None
|
||||||
|
|
||||||
# ─── Job Modules ───
|
# ─── Job Modules ───
|
||||||
|
|
||||||
def get_job_modules(self) -> list[str]:
|
def get_job_modules(self) -> list[str]:
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ async def _check_entity_ownership(
|
|||||||
detail={"detail": f"Unknown entity type: {entity_type}", "code": "not_found"},
|
detail={"detail": f"Unknown entity type: {entity_type}", "code": "not_found"},
|
||||||
)
|
)
|
||||||
|
|
||||||
model = model_info["model"]
|
model = model_info # ENTITY_MODELS maps directly to model classes
|
||||||
try:
|
try:
|
||||||
eid = uuid.UUID(entity_id)
|
eid = uuid.UUID(entity_id)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
|||||||
Reference in New Issue
Block a user