Skip to content

Commit

Permalink
remove not used manager event
Browse files Browse the repository at this point in the history
  • Loading branch information
fregataa committed Nov 26, 2024
1 parent 5f7d923 commit 3ce06ff
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/ai/backend/manager/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class ManagerStatus(enum.StrEnum):

class SchedulerEvent(enum.StrEnum):
SCHEDULE = "schedule"
PREPARE = "prepare"
CHECK_PRECOND = "check_precondition"
START_SESSION = "start_session"
SCALE_SERVICES = "scale_services"
2 changes: 1 addition & 1 deletion src/ai/backend/manager/api/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ async def scheduler_trigger(request: web.Request, params: Any) -> web.Response:
match params["event"]:
case SchedulerEvent.SCHEDULE:
await root_ctx.event_producer.produce_event(DoScheduleEvent())
case SchedulerEvent.PREPARE | SchedulerEvent.CHECK_PRECOND:
case SchedulerEvent.CHECK_PRECOND:
await root_ctx.event_producer.produce_event(DoCheckPrecondEvent())
case SchedulerEvent.START_SESSION:
await root_ctx.event_producer.produce_event(DoStartSessionEvent())
Expand Down
4 changes: 2 additions & 2 deletions src/ai/backend/manager/scheduler/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Sequence,
)
from contextvars import ContextVar
from datetime import datetime, timedelta
from datetime import datetime, timedelta, timezone
from decimal import Decimal
from functools import partial
from typing import (
Expand Down Expand Up @@ -1289,7 +1289,7 @@ def _pipeline(r: Redis) -> RedisPipeline:
)
try:
async with self.lock_factory(LockID.LOCKID_START_TIMER, 600):
now = datetime.now(tzutc())
now = datetime.now(timezone.utc)
known_slot_types = await self.shared_config.get_resource_slots()
sched_ctx = SchedulingContext(
self.registry,
Expand Down

0 comments on commit 3ce06ff

Please sign in to comment.