| @@ -1,6 +1,7 @@ | |||||
| package worker | package worker | ||||
| import ( | import ( | ||||
| "code.gitea.io/gitea/modules/setting" | |||||
| "github.com/RichardKnop/machinery/v1" | "github.com/RichardKnop/machinery/v1" | ||||
| mchConf "github.com/RichardKnop/machinery/v1/config" | mchConf "github.com/RichardKnop/machinery/v1/config" | ||||
| ) | ) | ||||
| @@ -19,9 +20,9 @@ func init() { | |||||
| func NewTaskCenter() (*machinery.Server, error) { | func NewTaskCenter() (*machinery.Server, error) { | ||||
| cnf := &mchConf.Config{ | cnf := &mchConf.Config{ | ||||
| Broker: "redis://localhost:6379", | |||||
| DefaultQueue: "DecompressTasksQueue", | |||||
| ResultBackend: "redis://localhost:6379", | |||||
| Broker: setting.Broker, | |||||
| DefaultQueue: setting.DefaultQueue, | |||||
| ResultBackend: setting.ResultBackend, | |||||
| } | } | ||||
| // Create server instance | // Create server instance | ||||
| return machinery.NewServer(cnf) | return machinery.NewServer(cnf) | ||||