Skip to content

Commit

Permalink
Updated the job scheduler arguments
Browse files Browse the repository at this point in the history
Updated the job scheduler arguments
  • Loading branch information
NaveenKinnal committed Dec 6, 2022
1 parent dcc0026 commit 4f5de4c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json
import os
import threading
from typing import Any, Dict, List
from typing import Any, Dict, List, Optional

from contaxy.operations.components import ComponentOperations
from contaxy.schema.exceptions import CREATE_RESOURCE_RESPONSES
Expand Down Expand Up @@ -231,7 +231,7 @@ def get_all_scheduled_jobs_from_db(


def get_job_from_job_input(
job_schedule: ScheduledJobInput, job_id: str = None
job_schedule: ScheduledJobInput, job_id: Optional[str] = None
) -> ScheduledJob:

return ScheduledJob(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from contaxy.schema.deployment import JobInput
from pydantic import BaseModel, Field

from typing import Optional

class ScheduledJobInput(BaseModel):
cron_string: str = Field(
Expand All @@ -25,13 +25,13 @@ class ScheduledJob(ScheduledJobInput):
description="The time the job was created in ISO format.",
example="2022-09-29T11:39:52.441287",
)
last_run: str = Field(
...,
last_run: Optional[str] = Field(
None,
description="The last time the job was run in ISO format.",
example="2022-09-29T11:39:52.441287",
)
next_run: str = Field(
...,
next_run: Optional[str] = Field(
None,
description="The next time the job will be run in ISO format.",
example="2022-09-29T11:39:52.441287",
)

0 comments on commit 4f5de4c

Please sign in to comment.