fix: 在 CheckRssJob 函数中添加 2 分钟的抑制时间,以避免频繁调用 CheckNewRss
This commit is contained in:
parent
9e30583c8c
commit
16221eb821
@ -28,6 +28,8 @@ func CheckRssJob() {
|
|||||||
now := time.Now()
|
now := time.Now()
|
||||||
if now.Minute()%5 == 0 {
|
if now.Minute()%5 == 0 {
|
||||||
go CheckNewRss()
|
go CheckNewRss()
|
||||||
|
//inhibit 2 minutes
|
||||||
|
time.Sleep(time.Minute * 2)
|
||||||
}
|
}
|
||||||
nextAwake := 5 - now.Minute()%5
|
nextAwake := 5 - now.Minute()%5
|
||||||
if nextAwake == 0 {
|
if nextAwake == 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user