We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 726fa7b + 53081e2 commit aa5aa74Copy full SHA for aa5aa74
1 file changed
fastapi_crons/endpoints.py
@@ -6,8 +6,7 @@
6
from fastapi import APIRouter, HTTPException
7
8
from . import __version__
9
-from .config import CronConfig
10
-from .scheduler import Crons
+from .scheduler import get_crons
11
12
# Track server start time for uptime calculation
13
_server_start_time: float | None = None
@@ -22,8 +21,8 @@ def get_cron_router():
22
21
router = APIRouter()
23
24
# Initialize configuration and scheduler
25
- config = CronConfig()
26
- crons = Crons(config=config)
+ crons = get_crons()
+ config = crons.config
27
28
async def get_all_jobs():
29
if not crons:
0 commit comments