-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Brings back
EventPersister
in discovery of background services (#17240
- Loading branch information
1 parent
dc78b56
commit d4d9001
Showing
2 changed files
with
64 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
from prefect.server.events.services.actions import Actions | ||
from prefect.server.events.services.event_logger import EventLogger | ||
from prefect.server.events.services.event_persister import EventPersister | ||
from prefect.server.events.services.triggers import ProactiveTriggers, ReactiveTriggers | ||
from prefect.server.events.stream import Distributor | ||
from prefect.server.services.base import RunInAllServers, Service | ||
from prefect.server.services.cancellation_cleanup import CancellationCleanup | ||
from prefect.server.services.flow_run_notifications import FlowRunNotifications | ||
from prefect.server.services.foreman import Foreman | ||
from prefect.server.services.late_runs import MarkLateRuns | ||
from prefect.server.services.pause_expirations import FailExpiredPauses | ||
from prefect.server.services.scheduler import RecentDeploymentsScheduler, Scheduler | ||
from prefect.server.services.task_run_recorder import TaskRunRecorder | ||
from prefect.server.services.telemetry import Telemetry | ||
|
||
|
||
def test_the_all_service_subset(): | ||
"""The following services should be enabled on background servers or full-featured | ||
API servers""" | ||
assert set(Service.all_services()) == { | ||
Telemetry, | ||
# Orchestration services | ||
CancellationCleanup, | ||
FailExpiredPauses, | ||
FlowRunNotifications, | ||
Foreman, | ||
MarkLateRuns, | ||
RecentDeploymentsScheduler, | ||
Scheduler, | ||
TaskRunRecorder, | ||
# Events services | ||
Actions, | ||
Distributor, | ||
EventLogger, | ||
EventPersister, | ||
ProactiveTriggers, | ||
ReactiveTriggers, | ||
} | ||
|
||
|
||
def test_run_in_all_servers(): | ||
"""The following services should be enabled on background servers and web-only | ||
API servers""" | ||
assert set(RunInAllServers.all_services()) == { | ||
# Orchestration services | ||
TaskRunRecorder, | ||
# Events services | ||
Actions, | ||
Distributor, | ||
EventLogger, | ||
EventPersister, | ||
ProactiveTriggers, | ||
ReactiveTriggers, | ||
} |