MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / iter_actions_for_event

Method iter_actions_for_event

apps/plugins/loader.py:273–288  ·  view source on GitHub ↗

Yield (plugin_key, action_id) pairs from the in-memory registry.

(self, event_name: str)

Source from the content-addressed store, hash-verified

271 return self._registry
272
273 def iter_actions_for_event(self, event_name: str) -> Iterator[Tuple[str, str]]:
274 """Yield (plugin_key, action_id) pairs from the in-memory registry."""
275 with self._lock:
276 registry = list(self._registry.items())
277 for key, lp in registry:
278 for action in lp.actions or []:
279 if not isinstance(action, dict):
280 continue
281 action_id = action.get("id")
282 events = action.get("events")
283 if (
284 action_id
285 and isinstance(events, (list, tuple))
286 and event_name in events
287 ):
288 yield key, action_id
289
290 def _load_plugin(
291 self,

Callers 3

trigger_eventFunction · 0.80

Calls 1

getMethod · 0.45