Sync: Make python paths dynamic for container/host environment compatibility
This commit is contained in:
parent
af496b79a6
commit
5699678a27
1 changed files with 9 additions and 2 deletions
|
|
@ -11,9 +11,16 @@ from pathlib import Path
|
|||
from datetime import datetime
|
||||
|
||||
# === CONFIG ===
|
||||
import sys
|
||||
BASE_DIR = Path("/home/matrixhasyou/mutt")
|
||||
PYTHON_BIN = "/usr/bin/python3"
|
||||
GOOGLE_PYTHON_BIN = "/home/matrixhasyou/swarm-services/domovoy-bot/venv-google/bin/python"
|
||||
PYTHON_BIN = sys.executable
|
||||
|
||||
VENV_GOOGLE = Path("/home/matrixhasyou/swarm-services/domovoy-bot/venv-google/bin/python")
|
||||
if VENV_GOOGLE.exists() and not os.path.exists("/.dockerenv"):
|
||||
GOOGLE_PYTHON_BIN = str(VENV_GOOGLE)
|
||||
else:
|
||||
GOOGLE_PYTHON_BIN = sys.executable
|
||||
|
||||
EXPORT_SCRIPT = BASE_DIR / "export_emails.py"
|
||||
CONSOLIDATE_SCRIPT = BASE_DIR / "consolidate_to_mega_pdf.py"
|
||||
DRIVE_SYNC_SCRIPT = Path("/home/matrixhasyou/domovoy_drive_sync.py")
|
||||
|
|
|
|||
Loading…
Reference in a new issue