mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix issues with the Linux integration and external databases
This commit is contained in:
parent
71db00281d
commit
bff775f006
2 changed files with 3 additions and 2 deletions
|
|
@ -38,13 +38,14 @@ class JobScheduler(ApiCaller):
|
|||
logger: Optional[Logger] = None,
|
||||
integration: str = "Linux",
|
||||
*,
|
||||
db: Optional[Database] = None,
|
||||
lock: Optional[Lock] = None,
|
||||
apis: Optional[list] = None,
|
||||
):
|
||||
super().__init__(apis or [])
|
||||
self.__logger = logger or setup_logger("Scheduler", getenv("LOG_LEVEL", "INFO"))
|
||||
self.__integration = integration
|
||||
self.__db = Database(self.__logger)
|
||||
self.__db = db or Database(self.__logger)
|
||||
self.__env = env or {}
|
||||
self.__env.update(environ)
|
||||
self.__jobs = self.__get_jobs()
|
||||
|
|
|
|||
|
|
@ -291,7 +291,7 @@ if __name__ == "__main__":
|
|||
env["DATABASE_URI"] = db.database_uri
|
||||
|
||||
# Instantiate scheduler
|
||||
SCHEDULER = JobScheduler(env.copy() | environ.copy(), logger, INTEGRATION)
|
||||
SCHEDULER = JobScheduler(env.copy() | environ.copy(), logger, INTEGRATION, db=db)
|
||||
|
||||
if INTEGRATION in ("Docker", "Swarm", "Kubernetes", "Autoconf"):
|
||||
# Automatically setup the scheduler apis
|
||||
|
|
|
|||
Loading…
Reference in a new issue