Commit Graph

13 Commits

Author SHA1 Message Date
Torsten Schulz (local)
8a08a74b80 Refactor ProductionPlan to use f64 for money: Updated the money field in ProductionPlan from i32 to f64 to accommodate decimal values from the database. Adjusted related calculations in DirectorWorker to handle floating-point arithmetic for production costs and money management, ensuring accurate financial computations. 2025-12-01 09:35:23 +01:00
Torsten Schulz (local)
1adff4e716 Add functionality to identify elections needing candidates: Introduced a new SQL query to select elections without candidates, including both newly registered and manually created elections. Updated the PoliticsWorker to schedule elections and insert candidates accordingly, ensuring all relevant elections are processed. 2025-11-26 17:02:36 +01:00
Torsten Schulz (local)
407cdd9bdc Add transport planning functionality in DirectorWorker: Introduced logic for planning transports for inventory items, including new SQL queries for fetching regional worth and available transport vehicles. Enhanced inventory management by updating quantities based on transport outcomes and improved logging for transport planning decisions. 2025-11-26 16:21:11 +01:00
Torsten Schulz (local)
8ee0bbf3cd Add TransportWorker and enhance logging: Introduced TransportWorker to the worker module and improved shutdown logging in the daemon for better visibility during system termination. Updated watchdog thread sleep mechanism for quicker shutdown response and refined error handling in DbError conversion to include SQLSTATE as a string. 2025-11-26 16:03:27 +01:00
Torsten Schulz (local)
25f2eb150d Enhance error handling in DbError conversion: Improved the From<PgError> implementation to provide detailed error messages, including SQLSTATE, detail, and hint when available, for better debugging and clarity in database error reporting. 2025-11-25 14:21:42 +01:00
Torsten Schulz (local)
5f44f50304 Refine SQL query type casting in BaseWorker: Updated the update_money query to explicitly cast parameters to their respective types (int4, float8, text) for improved type safety and database interaction. 2025-11-24 09:41:59 +01:00
Torsten Schulz (local)
70ff0bc06c Implement robust type handling in row_to_map: Enhanced the row_to_map function to provide a more reliable string representation of database values based on their actual types, improving error handling and data integrity. 2025-11-24 09:36:32 +01:00
Torsten Schulz (local)
2c547ed495 Enhance logging in BaseWorker: Updated watchdog logging to suppress "idle" messages, reducing spam during continuous operation and improving debug clarity. 2025-11-24 09:29:54 +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)
071c05629e Add WebSocket logging functionality: Implemented in-memory logging for WebSocket events, allowing retrieval of logs for the last 24 hours. Enhanced connection handling to log message direction and user information. 2025-11-22 09:44:44 +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