Implement worker schedule access control and runtime tracking: Added a new user right worker_schedule_read to manage access to the getWorkerSchedules WebSocket endpoint. Enhanced the WebSocket server to handle requests for worker schedules, including detailed responses. Introduced runtime tracking for workers, allowing for monitoring of their current state and activity. Updated relevant SQL and Rust structures to support these features.
All checks were successful
Deploy yourpart (blue-green) / deploy (push) Successful in 1m36s

This commit is contained in:
Torsten Schulz (local)
2026-05-08 09:04:21 +02:00
parent b7d7705bbe
commit 42f71d831f
7 changed files with 479 additions and 5 deletions

View File

@@ -45,3 +45,11 @@ Spalte **`falukant_log.production.completion_count`**: zählt **abgeschlossene P
## `016_falukant_log_political_office_history.sql`
Tabelle **`falukant_log.political_office_history`**: Archiv abgeschlossener politischer Amtszeiten (`character_id`, `office_type_id`, `region_id`, `start_date`, `end_date`). Der Daemon schreibt **vor** jedem relevanten `DELETE` auf **`falukant_data.political_office`** (Amtsende/Neuwahl-Pfad, Übersitz-Trim, Charaktertod). **`falukant_data.process_elections()`** (PostgreSQL) liegt außerhalb des Rust-Repos — falls dort Zeilen gelöscht werden, analog **`INSERT` in diese Historie** in der DB-Funktion ergänzen.
## `018_worker_schedule_socket_right.sql`
Neues Benutzerrecht **`worker_schedule_read`** in **`type.user_right`**.
Dieses Recht erlaubt den WebSocket-Endpoint `getWorkerSchedules` (Daemon-Laufplan für Worker-Tasks mit Intervallen > 60 Sekunden). Zugriff haben:
- Nutzer mit Rechtstitel `admin`
- Nutzer mit Rechtstitel `worker_schedule_read`