From 7be6f47849507828300e41bdbc92ac26a45449b7 Mon Sep 17 00:00:00 2001 From: aria1th <35677394+aria1th@users.noreply.github.com> Date: Fri, 20 Oct 2023 19:07:14 +0900 Subject: [PATCH] fix command arg name for sqlite database --- agent_scheduler/db/base.py | 8 ++++---- preload.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agent_scheduler/db/base.py b/agent_scheduler/db/base.py index 0ae2210..abad8a6 100644 --- a/agent_scheduler/db/base.py +++ b/agent_scheduler/db/base.py @@ -7,12 +7,12 @@ from sqlalchemy.orm import declarative_base from modules import scripts from modules import shared -if hasattr(shared.cmd_opts, "sqlite_file"): +if hasattr(shared.cmd_opts, "agent_scheduler_sqlite_file"): # if relative path, join with basedir - if not os.path.isabs(shared.cmd_opts.sqlite_file): - db_file = os.path.join(scripts.basedir(), shared.cmd_opts.sqlite_file) + if not os.path.isabs(shared.cmd_opts.agent_scheduler_sqlite_file): + db_file = os.path.join(scripts.basedir(), shared.cmd_opts.agent_scheduler_sqlite_file) else: - db_file = os.path.abspath(shared.cmd_opts.sqlite_file) + db_file = os.path.abspath(shared.cmd_opts.agent_scheduler_sqlite_file) print(f"Using sqlite file: {db_file}") diff --git a/preload.py b/preload.py index c805389..8dc3f85 100644 --- a/preload.py +++ b/preload.py @@ -1,7 +1,7 @@ # preload.py is used for cmd line arguments def preload(parser): parser.add_argument( - "--sqlite-file", + "--agent-scheduler-sqlite-file", help="sqlite file to use for the database connection. It can be abs or relative path(from base path) default: task_scheduler.sqlite3", default="task_scheduler.sqlite3", ) \ No newline at end of file