agnes-the-ai-analyst/server/bin/collect-sessions
Petr f2d3d156e3 Move standalone services from server/ to services/
Extract 4 self-contained services into services/ module:
- server/telegram_bot/ -> services/telegram_bot/
- server/ws_gateway/ -> services/ws_gateway/
- server/corporate_memory/ -> services/corporate_memory/
- server/session_collector.py -> services/session_collector/

Each service now has its own systemd/ directory with .service and .timer files.
deploy.sh updated to auto-discover service units from services/*/systemd/*.

server/ now contains only deployment infrastructure (deploy.sh, setup scripts,
bin/ management tools, sudoers, nginx config).

All imports updated: webapp/app.py, server/bin/ scripts, systemd ExecStart paths.
2026-03-09 12:54:30 +01:00

16 lines
388 B
Bash
Executable file

#!/bin/bash
# Wrapper script for the session transcript collector
# This script is called by systemd timer every 6 hours
set -euo pipefail
APP_DIR="/opt/data-analyst"
REPO_DIR="${APP_DIR}/repo"
VENV_PYTHON="${APP_DIR}/.venv/bin/python"
cd "$REPO_DIR"
# No environment variables needed - pure file operations
# Run the collector
exec "$VENV_PYTHON" -m services.session_collector "$@"