本站源代码
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

26 rindas
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