mirror of
https://github.com/Rarebuffalo/securelens-backend.git
synced 2026-06-19 07:00:30 +00:00
add fallback for apscheduler import if not installed
This commit is contained in:
@@ -37,7 +37,19 @@ import logging
|
|||||||
from datetime import datetime, timezone, timedelta
|
from datetime import datetime, timezone, timedelta
|
||||||
|
|
||||||
import httpx
|
import httpx
|
||||||
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
try:
|
||||||
|
from apscheduler.schedulers.asyncio import AsyncIOScheduler
|
||||||
|
except ImportError:
|
||||||
|
class AsyncIOScheduler:
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
self.running = False
|
||||||
|
def add_job(self, *args, **kwargs):
|
||||||
|
pass
|
||||||
|
def start(self):
|
||||||
|
pass
|
||||||
|
def shutdown(self, *args, **kwargs):
|
||||||
|
pass
|
||||||
|
|
||||||
from sqlalchemy import select
|
from sqlalchemy import select
|
||||||
|
|
||||||
from app.database import AsyncSessionLocal
|
from app.database import AsyncSessionLocal
|
||||||
|
|||||||
Reference in New Issue
Block a user