mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-24 19:54:25 -04:00
refactor: call setup_django with the check_db
attribute for the commands that actually need the database
This commit is contained in:
parent
57d1a3d4e5
commit
a57a5b6b83
1 changed files with 1 additions and 1 deletions
|
@ -63,7 +63,7 @@ def run_subcommand(subcommand: str,
|
||||||
|
|
||||||
if subcommand not in meta_cmds:
|
if subcommand not in meta_cmds:
|
||||||
from ..config import setup_django
|
from ..config import setup_django
|
||||||
setup_django(in_memory_db=subcommand in fake_db)
|
setup_django(in_memory_db=subcommand in fake_db, check_db=subcommand in archive_cmds)
|
||||||
|
|
||||||
module = import_module('.archivebox_{}'.format(subcommand), __package__)
|
module = import_module('.archivebox_{}'.format(subcommand), __package__)
|
||||||
module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore
|
module.main(args=subcommand_args, stdin=stdin, pwd=pwd) # type: ignore
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue