mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-29 19:35:20 +02:00
Manual-as-a-standalone-trigger conflates "user clicks Run now" with the
trigger model and forces ad-hoc input plumbing on the caller. Remove the
unreachable surface so the tree reflects reality (schedule is the only
v1 trigger).
- Unregister `manual`: drop import from triggers/__init__.py
- Delete `app/automations/triggers/manual/`
- Drop `RunService.dispatch_manual` (RunService is now read-only)
- Drop `POST /automations/{id}/run` and `RunDispatched` schema
- Keep `TriggerType.MANUAL` Python + PG enum value (reserved, documented)
to avoid an Alembic round-trip when Run-now is redesigned
20 lines
532 B
Python
20 lines
532 B
Python
"""Triggers domain: registry surface + built-in trigger packages.
|
|
|
|
Each trigger lives in its own subpackage (``schedule/``, ...) and
|
|
self-registers at import time via its ``definition`` module.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from .store import all_triggers, get_trigger, register_trigger
|
|
from .types import TriggerDefinition
|
|
|
|
__all__ = [
|
|
"TriggerDefinition",
|
|
"all_triggers",
|
|
"get_trigger",
|
|
"register_trigger",
|
|
]
|
|
|
|
# Built-in triggers self-register at import time.
|
|
from . import schedule # noqa: E402, F401
|