remove scheduler (#964)
This commit is contained in:
@@ -19,7 +19,6 @@ from skyvern.forge.sdk.db.exceptions import NotFoundError
|
|||||||
from skyvern.forge.sdk.routes.agent_protocol import base_router
|
from skyvern.forge.sdk.routes.agent_protocol import base_router
|
||||||
from skyvern.forge.sdk.routes.streaming import websocket_router
|
from skyvern.forge.sdk.routes.streaming import websocket_router
|
||||||
from skyvern.forge.sdk.settings_manager import SettingsManager
|
from skyvern.forge.sdk.settings_manager import SettingsManager
|
||||||
from skyvern.scheduler import SCHEDULER
|
|
||||||
|
|
||||||
LOG = structlog.get_logger()
|
LOG = structlog.get_logger()
|
||||||
|
|
||||||
@@ -60,14 +59,6 @@ def get_agent_app() -> FastAPI:
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Register the scheduler on startup so that we can schedule jobs dynamically
|
|
||||||
@app.on_event("startup")
|
|
||||||
def start_scheduler() -> None:
|
|
||||||
LOG.info("Starting the skyvern scheduler.")
|
|
||||||
SCHEDULER.start()
|
|
||||||
|
|
||||||
LOG.info("Server startup complete. Skyvern is now online")
|
|
||||||
|
|
||||||
@app.exception_handler(NotFoundError)
|
@app.exception_handler(NotFoundError)
|
||||||
async def handle_not_found_error(request: Request, exc: NotFoundError) -> Response:
|
async def handle_not_found_error(request: Request, exc: NotFoundError) -> Response:
|
||||||
return Response(status_code=status.HTTP_404_NOT_FOUND)
|
return Response(status_code=status.HTTP_404_NOT_FOUND)
|
||||||
|
|||||||
@@ -3,13 +3,3 @@ from enum import StrEnum
|
|||||||
|
|
||||||
class OrganizationAuthTokenType(StrEnum):
|
class OrganizationAuthTokenType(StrEnum):
|
||||||
api = "api"
|
api = "api"
|
||||||
|
|
||||||
|
|
||||||
class ScheduleRuleUnit(StrEnum):
|
|
||||||
# No support for scheduling every second
|
|
||||||
minute = "minute"
|
|
||||||
hour = "hour"
|
|
||||||
day = "day"
|
|
||||||
week = "week"
|
|
||||||
month = "month"
|
|
||||||
year = "year"
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
|
||||||
|
|
||||||
SCHEDULER = AsyncIOScheduler()
|
|
||||||
Reference in New Issue
Block a user