fix command arg name for sqlite database
parent
74a8dc88be
commit
7be6f47849
|
|
@ -7,12 +7,12 @@ from sqlalchemy.orm import declarative_base
|
||||||
from modules import scripts
|
from modules import scripts
|
||||||
from modules import shared
|
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 relative path, join with basedir
|
||||||
if not os.path.isabs(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.sqlite_file)
|
db_file = os.path.join(scripts.basedir(), shared.cmd_opts.agent_scheduler_sqlite_file)
|
||||||
else:
|
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}")
|
print(f"Using sqlite file: {db_file}")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# preload.py is used for cmd line arguments
|
# preload.py is used for cmd line arguments
|
||||||
def preload(parser):
|
def preload(parser):
|
||||||
parser.add_argument(
|
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",
|
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",
|
default="task_scheduler.sqlite3",
|
||||||
)
|
)
|
||||||
Loading…
Reference in New Issue