Skip to content

Commit 265c51d

Browse files
author
Kowser
committed
Clean redundant typecheck
1 parent 3d591d0 commit 265c51d

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/conductor/client/scheduler_client.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
from __future__ import annotations
22
import logging
33
from abc import ABC, abstractmethod
4-
from typing import Optional, List, TYPE_CHECKING
4+
from typing import Optional, List
55
from conductor.client.http.models.workflow_schedule import WorkflowSchedule
66
from conductor.client.http.models.save_schedule_request import SaveScheduleRequest
77
from conductor.client.http.models.search_result_workflow_schedule_execution_model import \
88
SearchResultWorkflowScheduleExecutionModel
99
from conductor.client.orkes.models.metadata_tag import MetadataTag
1010

11-
if TYPE_CHECKING:
12-
from conductor.client.ai.schedule import Schedule, ScheduleInfo
13-
14-
# AgentRuntime applies the user-configured log level to logging.getLogger("conductor.ai"),
15-
# and schedule reconciliation must keep honoring it — do not rename this logger.
16-
_logger = logging.getLogger("conductor.ai.agents.schedule")
11+
logger = logging.getLogger(__name__)
1712

1813

1914
class SchedulerClient(ABC):
@@ -178,11 +173,11 @@ def reconcile(self, agent_name: str, desired: Optional[List["Schedule"]]) -> Non
178173

179174
for short, wire in existing_wire_by_short.items():
180175
if short not in desired_short:
181-
_logger.info("Pruning schedule %s for agent %s", wire, agent_name)
176+
logger.info("Pruning schedule %s for agent %s", wire, agent_name)
182177
self.delete(wire)
183178

184179
for s in desired:
185-
_logger.info(
180+
logger.info(
186181
"Upserting schedule %s for agent %s", _prefix(agent_name, s.name), agent_name
187182
)
188183
try:

0 commit comments

Comments
 (0)