本站源代码
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

26 linhas
663B

  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. }
上海开阖软件有限公司 沪ICP备12045867号-1