mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-14 15:14:31 -04:00
use constants in more places
This commit is contained in:
parent
eb360f188a
commit
ed45f58758
5 changed files with 53 additions and 64 deletions
|
@ -37,7 +37,7 @@ class RipgrepConfig(BaseConfigSet):
|
|||
'--files-with-matches',
|
||||
'--regexp',
|
||||
])
|
||||
RIPGREP_SEARCH_DIR: str = Field(default=lambda: str(settings.ARCHIVE_DIR))
|
||||
RIPGREP_SEARCH_DIR: Path = archivebox.CONSTANTS.ARCHIVE_DIR
|
||||
|
||||
RIPGREP_CONFIG = RipgrepConfig()
|
||||
|
||||
|
@ -81,7 +81,7 @@ class RipgrepSearchBackend(BaseSearchBackend):
|
|||
ripgrep_binary.abspath,
|
||||
*RIPGREP_CONFIG.RIPGREP_ARGS_DEFAULT,
|
||||
text,
|
||||
RIPGREP_CONFIG.RIPGREP_SEARCH_DIR,
|
||||
str(RIPGREP_CONFIG.RIPGREP_SEARCH_DIR),
|
||||
]
|
||||
proc = run(cmd, timeout=SEARCH_BACKEND_CONFIG.SEARCH_BACKEND_TIMEOUT, capture_output=True, text=True)
|
||||
timestamps = set()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue