fix: InitChannelCache does not filter disabled channels (#201)
* chore: Show the HTTP status code in the test_time script to determine the success or failure of the request. * fix: InitChannelCache does not filter disabled channels * chore: do not hardcode --------- Co-authored-by: JustSong <songquanpeng@foxmail.com>
This commit is contained in:
parent
99fed1f850
commit
f0dc7f3f06
@ -108,7 +108,7 @@ var channelSyncLock sync.RWMutex
|
|||||||
func InitChannelCache() {
|
func InitChannelCache() {
|
||||||
newChannelId2channel := make(map[int]*Channel)
|
newChannelId2channel := make(map[int]*Channel)
|
||||||
var channels []*Channel
|
var channels []*Channel
|
||||||
DB.Find(&channels)
|
DB.Where("status = ?", common.ChannelStatusEnabled).Find(&channels)
|
||||||
for _, channel := range channels {
|
for _, channel := range channels {
|
||||||
newChannelId2channel[channel.Id] = channel
|
newChannelId2channel[channel.Id] = channel
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user