mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-03 06:17:53 +10:00
feat: Patch setup_django so we can use an inmemory db in specific commands
This commit is contained in:
committed by
Cristian Vargas
parent
35a5700c73
commit
9aac09a5e1
@@ -33,7 +33,6 @@ def write_search_index(link: Link, texts: Union[List[str], None]=None, out_dir:
|
||||
return
|
||||
|
||||
if not skip_text_index and texts:
|
||||
setup_django(out_dir, check_db=True)
|
||||
from core.models import Snapshot
|
||||
|
||||
snap = Snapshot.objects.filter(url=link.url).first()
|
||||
@@ -91,7 +90,6 @@ def index_links(links: Union[List[Link],None], out_dir: Path=OUTPUT_DIR):
|
||||
if not links:
|
||||
return
|
||||
|
||||
setup_django(out_dir=out_dir, check_db=True)
|
||||
from core.models import Snapshot, ArchiveResult
|
||||
|
||||
for link in links:
|
||||
|
||||
Reference in New Issue
Block a user