@ -183,6 +183,12 @@ func (r *Remind) GetTasksByKey(key string) []Task {
return res
}
func (r *Remind) GetTaskByID(id int) Task {
r.mu.RLock()
defer r.mu.RUnlock()
return r.tasks[id]
func (r *Remind) Stop() error {
for _, task := range r.tasks {
task.GetTimer().Stop()