mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
🐛 fix: manager timer panic
This commit is contained in:
parent
89bdc1e496
commit
173fd250cb
@ -39,10 +39,10 @@ var (
|
|||||||
|
|
||||||
// NewClock 添加一个新时钟
|
// NewClock 添加一个新时钟
|
||||||
func NewClock(db *sql.Sqlite) (c Clock) {
|
func NewClock(db *sql.Sqlite) (c Clock) {
|
||||||
c.loadTimers(db)
|
|
||||||
c.cron = cron.New()
|
c.cron = cron.New()
|
||||||
c.entries = make(map[uint32]cron.EntryID)
|
c.entries = make(map[uint32]cron.EntryID)
|
||||||
c.timers = &map[uint32]*Timer{}
|
c.timers = &map[uint32]*Timer{}
|
||||||
|
c.loadTimers(db)
|
||||||
c.cron.Start()
|
c.cron.Start()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user