feat(1c): add weekly digest and hard priority pages

This commit is contained in:
igor04091968
2026-05-22 16:03:04 +03:00
parent 70d12dca1d
commit ee4eea7e1a
8 changed files with 994 additions and 1 deletions
@@ -0,0 +1,12 @@
[Unit]
Description=AW-rus 1C Weekly Executive Digest
After=network-online.target aw-1c-manager-brief.service
Wants=network-online.target
[Service]
Type=oneshot
Environment=AW_1C_ROOT=/opt/activitywatch/clickhouse-1c
ExecStart=/opt/activitywatch/clickhouse-1c/ops/run_weekly_digest.sh
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,10 @@
[Unit]
Description=Run AW-rus 1C weekly digest every Monday morning
[Timer]
OnCalendar=Mon *-*-* 08:20:00
Unit=aw-1c-weekly-digest.service
Persistent=true
[Install]
WantedBy=timers.target
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="${AW_1C_ROOT:-/opt/activitywatch/clickhouse-1c}"
ENV_FILE="${ROOT}/.env"
VENV="${ROOT}/.venv"
if [[ ! -f "${ENV_FILE}" ]]; then
echo "missing env file: ${ENV_FILE}" >&2
exit 1
fi
if [[ ! -x "${VENV}/bin/python" ]]; then
echo "missing venv python: ${VENV}/bin/python" >&2
exit 1
fi
# shellcheck disable=SC1090
set -a
. "${ENV_FILE}"
set +a
exec "${VENV}/bin/python" "${ROOT}/ai/generate_weekly_digest.py"