Browse Source

fix for 47

tags/v1.21.12.1
e 5 years ago
parent
commit
1ae0653cfe
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