Torsten Schulz (local)
|
c943e57f80
|
Enhance production management by adding region_id to ProductionPlan and updating SQL queries: Introduced region_id to the ProductionPlan struct and modified the insert production query to include weather_type_id based on region. Updated finished productions query to account for weather effects on quality ratings, ensuring accurate production assessments. Improved comments for clarity on the impact of weather on production quality.
|
2025-12-02 09:57:31 +01:00 |
|
Torsten Schulz (local)
|
32dd79bc6e
|
Refactor hourly price recalculation logic: Implemented a two-tier pricing adjustment system based on sales data, comparing city sales against global and parent-region averages. Updated SQL queries to reflect new pricing rules, ensuring dynamic price adjustments within defined tolerances. Enhanced logging for better tracking of affected regions during recalculation.
|
2025-12-02 09:29:33 +01:00 |
|
Torsten Schulz (local)
|
4a2e814803
|
Enhance pricing logic in DirectorWorker and implement hourly price recalculation: Added a new worth_percent field to the InventoryItem struct and updated SQL queries to incorporate this value in price calculations. Refactored price computation logic to use a base price derived from worth_percent. Introduced a new hourly price recalculation mechanism that adjusts prices based on sales data from the last hour, ensuring dynamic pricing adjustments. Enhanced logging for better monitoring of price updates.
|
2025-12-02 08:55:01 +01:00 |
|
Torsten Schulz (local)
|
9ee8c970c7
|
Add branch capacity query and production limits in DirectorWorker: Introduced a new SQL query to fetch current stock and production values for a branch, enabling dynamic production management. Implemented logic to limit concurrent productions to a maximum of two and updated production creation to handle single production requests efficiently. Enhanced logging for better traceability of production activities.
|
2025-12-01 16:23:40 +01:00 |
|
Torsten Schulz (local)
|
513862a157
|
Limit maximum production quantity in DirectorWorker: Updated the production calculation to cap the output at 100 units per start, ensuring it does not exceed available capacity or financial constraints. Enhanced comments for better understanding of the production limits.
|
2025-12-01 15:55:59 +01:00 |
|
Torsten Schulz (local)
|
bd9fbb80c0
|
Enhance production job handling in DirectorWorker: Implemented a limit on the number of concurrent production jobs per branch to a maximum of two. Updated SQL query for fetching finished productions to aggregate quality ratings correctly and ensure unique results per production ID. Improved comments for clarity on the logic and SQL structure.
|
2025-12-01 14:32:31 +01:00 |
|
Torsten Schulz (local)
|
02bd0de75d
|
Refactor user ID filtering in WebSocket server: Enhanced the logic to only filter messages based on user_id if the target user ID is numerically valid. Updated comments for clarity on the filtering behavior and historical context regarding user ID handling.
|
2025-12-01 13:31:12 +01:00 |
|
Torsten Schulz (local)
|
b8fa644c97
|
Implement periodic ping frames in WebSocket server for keepalive and update overproduction handling in ProduceWorker to include branch_id. This enhances connection stability and improves notification clarity for overproduction events.
|
2025-12-01 13:25:23 +01:00 |
|
Torsten Schulz (local)
|
3e9f921f4f
|
Enhance DirectorWorker functionality: Added branch_id to the Director struct and updated SQL queries to include branch_id as a parameter. Improved logging messages to include branch_id for better traceability during production, transport, and sales checks. This change enhances the clarity and functionality of the DirectorWorker's operations.
|
2025-12-01 11:59:03 +01:00 |
|
Torsten Schulz (local)
|
a0e14788c7
|
Refactor money update execution in BaseWorker: Simplified the SQL execution by directly constructing the update query without parameterized placeholders, addressing serialization issues. Updated comments for clarity on the handling of money values and ensured compatibility with trusted data sources. Additionally, modified the casting of money in the director query to text for consistent mapping in Rust.
|
2025-12-01 11:31:37 +01:00 |
|
Torsten Schulz (local)
|
260b3b2962
|
Refactor SQL parameter handling in BaseWorker: Updated the execution of the money update query to pass parameters in their natural types, allowing PostgreSQL to handle type casting automatically. Improved comments for clarity on the changes made to ensure compatibility with the existing database schema.
|
2025-12-01 11:18:54 +01:00 |
|
Torsten Schulz (local)
|
25b69e48fe
|
Refactor money update execution in BaseWorker: Updated parameter handling in SQL execution to pass all values as strings, allowing for proper type casting in the database. Enhanced comments for clarity on the changes made to ensure compatibility with existing database schema.
|
2025-12-01 11:15:46 +01:00 |
|
Torsten Schulz (local)
|
2c91f1868b
|
Refactor SQL execution in BaseWorker: Updated the money update logic to register and execute prepared statements by name, enhancing clarity and consistency with existing code. Improved comments for better understanding of numeric type handling in SQL queries.
|
2025-12-01 11:09:17 +01:00 |
|
Torsten Schulz (local)
|
0825c05c31
|
Refactor money update logic in BaseWorker: Simplified the SQL execution by removing named prepared statement caches to avoid signature conflicts during schema changes. Updated comments for clarity on the handling of money change as a numeric type, ensuring compatibility with the database.
|
2025-12-01 10:59:02 +01:00 |
|
Torsten Schulz (local)
|
d98620ea06
|
Refactor SQL query in DirectorWorker: Removed unnecessary conditions from the query for fetching transport vehicles, simplifying the logic while maintaining functionality. This change enhances query readability and performance.
|
2025-12-01 10:55:50 +01:00 |
|
Torsten Schulz (local)
|
6f9e13b290
|
Update money handling in BaseWorker: Changed SQL query to cast money change to numeric type for compatibility with existing database schema. Updated parameter passing to ensure the value is sent as a string, allowing proper casting in the database. Added comments for clarity on the changes made.
|
2025-12-01 10:39:32 +01:00 |
|
Torsten Schulz (local)
|
7ae2f0c6c9
|
Enhance money production calculation in DirectorWorker: Updated the logic to handle cases where available money is zero, allowing production limits to be determined by capacity instead. Added warning logging for unexpected zero money scenarios, improving error handling and visibility in production planning.
|
2025-12-01 10:37:05 +01:00 |
|
Torsten Schulz (local)
|
cf874a7b8d
|
Refactor map_row_to_production_plan in DirectorWorker: Simplified the parsing of database fields by introducing local variables for required and optional fields. This change enhances readability and maintains default values for optional fields, improving the robustness of production plan creation.
|
2025-12-01 10:25:33 +01:00 |
|
Torsten Schulz (local)
|
9715723db7
|
Improve logging in DirectorWorker: Added detailed error messages and production calculations to enhance visibility into production planning and execution. Included checks for running productions and capacity constraints, ensuring better tracking of production processes.
|
2025-12-01 10:23:42 +01:00 |
|
Torsten Schulz (local)
|
d5017ef1e1
|
Enhance logging and error handling in DirectorWorker: Added detailed logging for production, transport, and sales checks for directors. Included a warning message when no directors are found for actions, improving visibility into the task execution process.
|
2025-12-01 10:09:19 +01:00 |
|
Torsten Schulz (local)
|
fbca231de5
|
Add running_productions_quantity to ProductionPlan: Introduced a new field to track the quantity of ongoing productions. Updated the DirectorWorker to parse this new field from the database and adjusted the free capacity calculation accordingly. Enhanced logging to provide detailed information when production cannot be started due to capacity constraints.
|
2025-12-01 10:04:09 +01:00 |
|
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 |
|