MCPcopy Index your code
hub / github.com/TruthHun/BookStack / Init

Function Init

models/base.go:40–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38)
39
40func Init() {
41 initAPI()
42 initAdsCache()
43 initOptionCache()
44 NewSign().UpdateSignRule() // 更新签到规则的全局变量
45 NewReadRecord().UpdateReadingRule() // 更新阅读计时规则的全局变量
46 go func() {
47 for {
48 AllowRegister = GetOptionValue("ENABLED_REGISTER", "true") == "true"
49 AllowVisitor = GetOptionValue("ENABLE_ANONYMOUS", "true") == "true"
50 time.Sleep(time.Second * 30)
51 }
52 }()
53 go NewEbook().CheckAndGenerateEbook()
54}
55
56//设置增减
57//@param table 需要处理的数据表

Callers 1

RunMethod · 0.92

Calls 10

initAPIFunction · 0.85
initAdsCacheFunction · 0.85
initOptionCacheFunction · 0.85
NewSignFunction · 0.85
NewReadRecordFunction · 0.85
GetOptionValueFunction · 0.85
NewEbookFunction · 0.85
UpdateSignRuleMethod · 0.80
UpdateReadingRuleMethod · 0.80
CheckAndGenerateEbookMethod · 0.80

Tested by

no test coverage detected