From 1ae0653cfef0131149a484a636c1001e4135bd39 Mon Sep 17 00:00:00 2001 From: e <747342561@qq.com> Date: Thu, 16 Jul 2020 11:12:25 +0800 Subject: [PATCH] fix for 47 --- modules/worker/worker.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/worker/worker.go b/modules/worker/worker.go index 0f725a538..25bf0cb4c 100755 --- a/modules/worker/worker.go +++ b/modules/worker/worker.go @@ -1,6 +1,7 @@ package worker import ( + "code.gitea.io/gitea/modules/setting" "github.com/RichardKnop/machinery/v1" mchConf "github.com/RichardKnop/machinery/v1/config" ) @@ -19,9 +20,9 @@ func init() { func NewTaskCenter() (*machinery.Server, error) { 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 return machinery.NewServer(cnf)