Commit Graph

7 Commits

Author SHA1 Message Date
Torsten Schulz (local)
10bc1e5a52 Refactor SQL queries into a dedicated module
- Moved SQL queries from multiple worker files into `src/worker/sql.rs` for better organization and maintainability.
- Updated references in `stockage_manager.rs`, `transport.rs`, `underground.rs`, `user_character.rs`, and `value_recalculation.rs` to use the new centralized SQL queries.
- Improved code readability by replacing `.get(0)` with `.first()` for better clarity when retrieving the first row from query results.
- Cleaned up unnecessary comments and consolidated related SQL queries.
2025-12-13 11:57:28 +01:00
Torsten Schulz (local)
d078b6b19a Refactor WebSocket user ID filtering and enhance SQL query security: Updated user ID handling in the WebSocket server to improve filtering logic for numeric user IDs. Implemented parameterized queries in the database operations across multiple worker files to prevent SQL injection vulnerabilities, ensuring safer data handling. 2025-12-08 11:56:04 +01:00
Torsten Schulz (local)
5a3a818d84 Add EventsWorker to worker module: Introduced EventsWorker for handling event-related tasks. Updated main.rs to include EventsWorker in the worker creation process. Adjusted WeatherWorker instantiation to use cloned pool and broker for consistency. 2025-12-08 11:17:16 +01:00
Torsten Schulz (local)
b11148b499 Add office gap management: Introduced new queries and logic in PoliticsWorker to identify and create elections for office type/region combinations with insufficient seats. Implemented trimming of excess offices to ensure compliance with configured seat limits. Updated UserCharacterWorker to delete political offices and maintain seat integrity post-deletion. 2025-11-24 09:25:30 +01:00
Torsten Schulz (local)
0968ab6b0b Add mood update functionality: Introduced a new mechanism for random mood updates in UserCharacterWorker, allowing characters to change mood approximately every 50 minutes. Updated SQL queries to ensure proper handling of character data. 2025-11-22 13:31:38 +01:00
Torsten Schulz (local)
f9d869ee23 Refactor worker modules: Added watchdog stop in BaseWorker, improved debug logging in PoliticsWorker, and removed unused credit_id in UserCharacterWorker. 2025-11-21 23:25:59 +01:00
Torsten Schulz (local)
d0ec363f09 Initial commit: Rust YpDaemon 2025-11-21 23:05:34 +01:00