Added tests for the task client and runner.

This commit is contained in:
mikestefanello 2024-06-21 08:36:51 -04:00
parent b68f9bdf3c
commit 5707343d57
6 changed files with 71 additions and 53 deletions

View file

@ -98,6 +98,7 @@ func NewTaskClient(cfg config.TasksConfig, db *sql.DB) (*TaskClient, error) {
// StartRunner starts the scheduler service which adds scheduled tasks to the queue.
// This must be running in order to execute queued tasked.
// To stop the runner, cancel the context.
// This is a blocking call.
func (t *TaskClient) StartRunner(ctx context.Context) {
t.runner.Start(ctx)
}