feat(workforce): add interpretation policy config

This commit is contained in:
igor04091968
2026-06-03 13:03:24 +03:00
parent 0302d888f6
commit 7bc1d4170a
7 changed files with 235 additions and 12 deletions
+10
View File
@@ -666,6 +666,7 @@
AW_WORKTIME_MANAGER_TREND_MIN_POINTS={{ aw_worktime_manager_trend_min_points | default(3) }}
AW_WORKTIME_MANAGER_TREND_DELTA_PCT={{ aw_worktime_manager_trend_delta_pct | default(10) }}
AW_WORKTIME_MANAGER_OFF_HOURS_THRESHOLD_SECONDS={{ aw_worktime_manager_off_hours_threshold_seconds | default(1800) }}
AW_WORKTIME_MANAGER_INTERPRETATION_POLICY={{ aw_worktime_interpretation_policy_path | default('/etc/activitywatch/worktime-interpretation-policy.json') }}
AW_DLP_INFLUX_ENABLED={{ 'true' if (aw_dlp_influx_enabled | default(false) | bool) else 'false' }}
AW_DLP_INFLUX_URL={{ aw_dlp_influx_url | default('') }}
AW_DLP_INFLUX_ORG={{ aw_dlp_influx_org | default('proxmox') }}
@@ -1098,6 +1099,15 @@
group: "{{ aw_server_group }}"
mode: "0750"
- name: Установить initial policy интерпретации Workforce если отсутствует
ansible.builtin.copy:
dest: "{{ aw_worktime_interpretation_policy_path | default('/etc/activitywatch/worktime-interpretation-policy.json') }}"
owner: root
group: root
mode: "0644"
force: false
content: "{{ lookup('file', aw_repo_root + '/configs/worktime-interpretation-policy.example.json') }}"
- name: Проверить локальный Rust AW worktime API
ansible.builtin.stat:
path: "{{ aw_rust_release_dir }}/worktime-api"
+1
View File
@@ -26,6 +26,7 @@ aw_worktime_manager_overload_coverage_pct: 115
aw_worktime_manager_trend_min_points: 3
aw_worktime_manager_trend_delta_pct: 10
aw_worktime_manager_off_hours_threshold_seconds: 1800
aw_worktime_interpretation_policy_path: "/etc/activitywatch/worktime-interpretation-policy.json"
aw_dlp_influx_enabled: false
aw_dlp_influx_url: "http://<INFLUXDB_HOST>:8086"
aw_dlp_influx_org: "proxmox"
+1
View File
@@ -26,6 +26,7 @@ aw_worktime_manager_overload_coverage_pct: 115
aw_worktime_manager_trend_min_points: 3
aw_worktime_manager_trend_delta_pct: 10
aw_worktime_manager_off_hours_threshold_seconds: 1800
aw_worktime_interpretation_policy_path: "/etc/activitywatch/worktime-interpretation-policy.json"
aw_dlp_influx_enabled: true
aw_dlp_influx_url: "http://192.0.2.10:8086"
aw_dlp_influx_org: "proxmox"