You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

task.go 663B

12345678910111213141516171819202122232425
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package setting
  5. var (
  6. // Task settings
  7. Task = struct {
  8. QueueType string
  9. QueueLength int
  10. QueueConnStr string
  11. }{
  12. QueueType: ChannelQueueType,
  13. QueueLength: 1000,
  14. QueueConnStr: "addrs=127.0.0.1:6379 db=0",
  15. }
  16. )
  17. func newTaskService() {
  18. sec := Cfg.Section("task")
  19. Task.QueueType = sec.Key("QUEUE_TYPE").MustString(ChannelQueueType)
  20. Task.QueueLength = sec.Key("QUEUE_LENGTH").MustInt(1000)
  21. Task.QueueConnStr = sec.Key("QUEUE_CONN_STR").MustString("addrs=127.0.0.1:6379 db=0")
  22. }