feat: channel support weight (#85)

*  feat: channel support weight

* 💄 improve: show version

* 💄 improve: Channel add copy operation

* 💄 improve: Channel support batch add
This commit is contained in:
Buer
2024-03-06 18:01:43 +08:00
committed by GitHub
parent 7c78ed9fad
commit dd3e79a20d
44 changed files with 1425 additions and 1019 deletions

View File

@@ -59,11 +59,11 @@ func main() {
if common.MemoryCacheEnabled {
common.SysLog("memory cache enabled")
common.SysError(fmt.Sprintf("sync frequency: %d seconds", common.SyncFrequency))
model.InitChannelCache()
model.InitChannelGroup()
}
if common.MemoryCacheEnabled {
go model.SyncOptions(common.SyncFrequency)
go model.SyncChannelCache(common.SyncFrequency)
go model.SyncChannelGroup(common.SyncFrequency)
}
if os.Getenv("CHANNEL_UPDATE_FREQUENCY") != "" {
frequency, err := strconv.Atoi(os.Getenv("CHANNEL_UPDATE_FREQUENCY"))