|
1 | 1 | from __future__ import annotations |
2 | 2 | import logging |
3 | 3 | from abc import ABC, abstractmethod |
4 | | -from typing import Optional, List, TYPE_CHECKING |
| 4 | +from typing import Optional, List |
5 | 5 | from conductor.client.http.models.workflow_schedule import WorkflowSchedule |
6 | 6 | from conductor.client.http.models.save_schedule_request import SaveScheduleRequest |
7 | 7 | from conductor.client.http.models.search_result_workflow_schedule_execution_model import \ |
8 | 8 | SearchResultWorkflowScheduleExecutionModel |
9 | 9 | from conductor.client.orkes.models.metadata_tag import MetadataTag |
10 | 10 |
|
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__) |
17 | 12 |
|
18 | 13 |
|
19 | 14 | class SchedulerClient(ABC): |
@@ -178,11 +173,11 @@ def reconcile(self, agent_name: str, desired: Optional[List["Schedule"]]) -> Non |
178 | 173 |
|
179 | 174 | for short, wire in existing_wire_by_short.items(): |
180 | 175 | 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) |
182 | 177 | self.delete(wire) |
183 | 178 |
|
184 | 179 | for s in desired: |
185 | | - _logger.info( |
| 180 | + logger.info( |
186 | 181 | "Upserting schedule %s for agent %s", _prefix(agent_name, s.name), agent_name |
187 | 182 | ) |
188 | 183 | try: |
|
0 commit comments