Fix module imports in run-analysis
This commit is contained in:
parent
086920339a
commit
0a05f0c010
3 changed files with 7 additions and 6 deletions
|
@ -20,13 +20,13 @@ fi
|
||||||
|
|
||||||
# Run analysis helpers
|
# Run analysis helpers
|
||||||
echo "[INFO] Checking for missing domains..."
|
echo "[INFO] Checking for missing domains..."
|
||||||
python scripts/analyze.py check-missing-domains
|
python -m scripts.analyze check-missing-domains
|
||||||
|
|
||||||
echo "[INFO] Suggesting cache improvements..."
|
echo "[INFO] Suggesting cache improvements..."
|
||||||
python scripts/analyze.py suggest-cache
|
python -m scripts.analyze suggest-cache
|
||||||
|
|
||||||
echo "[INFO] Detecting threats..."
|
echo "[INFO] Detecting threats..."
|
||||||
python scripts/analyze.py detect-threats
|
python -m scripts.analyze detect-threats
|
||||||
|
|
||||||
# Deactivate to keep cron environment clean
|
# Deactivate to keep cron environment clean
|
||||||
if type deactivate >/dev/null 2>&1; then
|
if type deactivate >/dev/null 2>&1; then
|
||||||
|
|
1
scripts/__init__.py
Normal file
1
scripts/__init__.py
Normal file
|
@ -0,0 +1 @@
|
||||||
|
"Utility package for ngxstat scripts"
|
|
@ -26,7 +26,7 @@ def test_script_invokes_commands(tmp_path):
|
||||||
|
|
||||||
lines = calls.read_text().strip().splitlines()
|
lines = calls.read_text().strip().splitlines()
|
||||||
assert lines == [
|
assert lines == [
|
||||||
"scripts/analyze.py check-missing-domains",
|
"-m scripts.analyze check-missing-domains",
|
||||||
"scripts/analyze.py suggest-cache",
|
"-m scripts.analyze suggest-cache",
|
||||||
"scripts/analyze.py detect-threats",
|
"-m scripts.analyze detect-threats",
|
||||||
]
|
]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue