mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-27 17:50:53 +01:00
refactor: enhance health check function and add comprehensive test coverage
- Updated GetHealthFn to return an error for better error handling and clarity. - Introduced a new test file for schedule management, covering various endpoints including creation, retrieval, updating, and deletion of schedules. - Added tests for task management, including task creation, retrieval, updating, and cancellation. - Implemented utility tests for filtering and response generation to ensure consistent API behavior. - Improved logging in the task scheduler service for better traceability.
This commit is contained in:
@@ -245,6 +245,7 @@ func newTaskSchedulerService() *Service {
|
||||
interval: 5 * time.Second,
|
||||
svr: server.GetGrpcServer(),
|
||||
handlerSvc: handler.GetTaskHandlerService(),
|
||||
Logger: utils.NewLogger("TaskScheduler"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user