ferry/pkg/task/server.go

23 lines
351 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package task
/*
@Author : lanyulei
*/
import (
"ferry/pkg/logger"
"ferry/pkg/task/worker"
)
func Start() {
// 1. 启动服务连接redis
worker.StartServer()
// 2. 启动异步调度
taskWorker := worker.NewAsyncTaskWorker(10)
err := taskWorker.Launch()
if err != nil {
logger.Errorf("启动machinery失败%v", err.Error())
}
}