Commit graph

5 commits

Author SHA1 Message Date
Max
a1869726d5 Enhance job execution and management features
- Implemented execution options to allow priority settings and shared data for job executions.
- Introduced new execution types for processes and commands, improving flexibility in job handling.
- Updated job and execution models to include new fields for execution options and priority.
- Refactored job submission logic to support context-aware execution, enhancing error handling and process management.
- Improved test coverage for job execution scenarios, ensuring robust validation of new features.
2025-09-01 12:26:29 +08:00
Max
5612fb58e2 Refactor error handling in category retrieval test and enhance time field processing
- Updated the test for category retrieval to use t.Fatal instead of t.Error for critical failures, ensuring immediate test termination on error.
- Refactored the mapToStruct function to improve handling of boolean and time fields, converting database time formats to RFC3339 and ensuring proper type conversions for specific keys.
2025-08-31 16:25:12 +08:00
Max
e2d8ef551f Refactor job and category saving logic to improve ID handling
- Updated SaveJob and SaveCategory functions to remove the ID field from data before saving, allowing the database to auto-increment IDs.
- Changed references from "id" to "job_id" and "category_id" in query parameters to align with the new ID handling.
- Enhanced SaveLog function to always create a new log entry, ensuring consistent handling of log data.
- Updated SaveExecution function to follow the same ID handling pattern as job and category saving.
2025-08-31 15:57:28 +08:00
Max
4dd1424080 Enhance job management functionality and improve execution handling
- Implemented comprehensive job management features, including pagination for job listing, active job retrieval, and job counting.
- Enhanced job saving logic to support both creation and updates, ensuring proper handling of job metadata.
- Introduced category management with automatic creation and retrieval of categories during job operations.
- Added execution management capabilities, including progress tracking and logging for job executions.
- Improved error handling and validation across job and execution methods, ensuring robustness in job processing.
- Updated documentation to reflect new features and usage examples for job management and execution tracking.
2025-08-31 15:38:32 +08:00
Max
38f86aa77b Implement job management functionality and update job model
- Added new job management functions: Once, Cron, and Daemon for creating jobs with different scheduling types.
- Introduced methods for job manipulation, including Start, Cancel, and various setters for job properties.
- Updated job model to reflect changes in the job execution process type, renaming "process_type" to "mode" and adjusting enum values to uppercase.
- Removed obsolete interfaces and types related to job management, streamlining the codebase.
2025-08-31 11:59:16 +08:00