Skip to content

Commit 9e6d7b8

Browse files
committed
clean
1 parent 33f3a10 commit 9e6d7b8

File tree

3 files changed

+1
-7
lines changed

3 files changed

+1
-7
lines changed

llama_stack/providers/utils/job_scheduler/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class CelerySchedulerConfig(SchedulerConfig):
5252
)
5353

5454

55-
# Union type for all scheduler configs with discriminator
5655
SchedulerConfigUnion = Annotated[
5756
InlineSchedulerConfig | CelerySchedulerConfig,
5857
Field(discriminator="type"),

llama_stack/providers/utils/job_scheduler/inline/scheduler.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ async def _load_jobs_from_storage(self) -> None:
8080
job["started_at"] = datetime.fromisoformat(job["started_at"])
8181
if job.get("completed_at"):
8282
job["completed_at"] = datetime.fromisoformat(job["completed_at"])
83-
# Deserialize JobStatus enum
8483
job["status"] = JobStatus(job["status"])
8584

8685
self._jobs[job["job_id"]] = job
@@ -171,8 +170,6 @@ async def _run_job(self, job_id: str) -> None:
171170
await self._save_job_to_storage(job)
172171

173172
# Execute the job based on job_type
174-
# This is where job-specific logic would be called
175-
# For now, we'll simulate a simple job execution
176173
result = await self._execute_job(job)
177174

178175
# Mark as completed
@@ -215,9 +212,8 @@ async def _execute_job(self, job: dict) -> dict:
215212
# Check if a custom executor is registered for this job type
216213
if job_type in self._job_executors:
217214
executor = self._job_executors[job_type]
218-
return await executor(job_data) # Call the registered executor
215+
return await executor(job_data)
219216

220-
# No executor registered for this job type
221217
raise ValueError(f"No executor registered for job type: {job_type}")
222218

223219
async def get_job_info(self, job_id: str) -> dict:

src/llama_stack/providers/utils/job_scheduler/inline/scheduler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ async def _load_jobs_from_storage(self) -> None:
7474

7575
for value in stored_values:
7676
job = json.loads(value)
77-
# Deserialize datetime strings back to datetime objects
7877
job["created_at"] = datetime.fromisoformat(job["created_at"])
7978
if job.get("started_at"):
8079
job["started_at"] = datetime.fromisoformat(job["started_at"])

0 commit comments

Comments
 (0)