Browse Source

Merge pull request 'fix for 47' (#48) from fix-47 into develop

Reviewed-by: palytoxin <sxty32@126.com>
tags/v1.21.12.1
yuyuanshifu 5 years ago
parent
commit
91dbe5de71
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      modules/worker/worker.go

+ 4
- 3
modules/worker/worker.go View File

@@ -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)


Loading…
Cancel
Save