14 Commits

Author SHA1 Message Date
ffcc7cd0aa Add support for subscribing and unsubscribing to all object updates
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Implemented `subscribeToAllObjectUpdates` and `unsubscribeAllObjectUpdates` methods in the `UpdateManager` to handle bulk updates for object types.
- Updated `SocketHost` and `SocketUser` classes to listen for new socket events related to all object updates.
- Enhanced test coverage for the new subscription methods to ensure correct functionality and integration with the socket client.
2026-09-01 14:14:18 +01:00
e563538e89 Refactor database utility functions and enhance document job schema
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Reformatted the `NOTIFICATION_EXCLUDED_MODELS` array for improved readability in `utils.js`.
- Updated the `editNotification` and `createNotification` functions for better code clarity by breaking long lines.
- Added a new `quantity` field to the `documentJobSchema`, ensuring it is required with a default value of 1 and a minimum of 1.
- Introduced new filtering capabilities in `updatemanager.js` to handle complex filter conditions, enhancing the overall filtering logic.
- Updated tests to mock new filter functionalities, ensuring proper integration and functionality verification.
2026-08-22 20:02:36 +01:00
e80022513f Remove unnecessary console logs from utility and schema files for cleaner code. Update index definitions for consistency in filament and printer profile schemas.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-23 21:44:40 +01:00
aad49bfcfd Add formatTraceData utility and integrate into logging
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
- Introduced a new utility function `formatTraceData` to standardize the formatting of trace data for logging purposes.
- Updated various modules including auth, database, and stats manager to utilize `formatTraceData` for improved log clarity and consistency.
- Added new schemas for printer profiles and filament profiles to enhance the data model.
- Implemented tests for session authentication to ensure robust functionality and error handling.
2026-07-20 02:11:56 +01:00
516402d40d Enhance UpdateManager and SocketUser classes to improve subscription management and disconnection handling.
Some checks failed
farmcontrol/farmcontrol-ws/pipeline/head There was a failure building this commit
- Added `removeAllListeners` method in UpdateManager to clear all subscriptions efficiently.
- Updated SocketUser's `handleDisconnect` method to log user disconnection more accurately based on user presence.
- Introduced subscription tracking in UpdateManager to manage active subscriptions.
2026-07-04 15:30:16 +01:00
083cc95523 Integrate expandObjectIds utility in UpdateManager to enhance object update handling, ensuring expanded values are emitted in socket events.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2026-07-04 15:18:04 +01:00
b1245595d9 Refactor UpdateManager to enhance filter matching logic, replacing listObjects calls with direct filter checks, and improve event emission for object updates. Added tests for reference filter matching. 2026-06-21 22:32:17 +01:00
3196385c72 Updated configuration log level to debug, added product category model and references in product schema, enhanced stock schemas with recalculation methods, and improved socket event handling to support filters for subscriptions. 2026-06-14 23:52:03 +01:00
f6e7fb3a41 Implement Jest testing framework and add initial test cases for various modules. Update configuration for test environment in config.json and add test results handling in Jenkinsfile. Include .gitignore entry for test results. Enhance package.json with Jest dependencies.
All checks were successful
farmcontrol/farmcontrol-ws/pipeline/head This commit looks good
2025-12-29 01:13:01 +00:00
2fc477ab25 Comment updates. 2025-12-13 21:08:18 +00:00
7f17f5f205 Rewrote subjob handling so it works and better progress updates too. 2025-12-02 18:29:59 +00:00
7ccc4bb993 Add NATS messaging support
- Introduced a new NatsServer class for managing NATS connections and messaging.
- Implemented connection handling, publishing, requesting, and subscription management.
- Updated index.js to connect to NATS on application startup and handle connection errors.
- Enhanced logging for NATS operations to improve traceability and error management.
2025-09-05 23:29:14 +01:00
1b86d256ca Enhance UpdateManager for object event handling and subscription management
- Refactored constructor to utilize socketClient for improved clarity.
- Added methods to subscribe and unsubscribe from object creation and update events.
- Implemented functionality to retrieve and set object updates in Etcd.
- Improved logging for event handling and error management.
2025-08-18 01:09:00 +01:00
bf56234c4b Refactor project structure: remove app.js, update config.json for environment-specific settings, enhance package.json with new scripts and dependencies, and convert websockets.js to ES module syntax with Keycloak authentication integration. 2025-06-29 22:39:23 +01:00