diff --git a/pkg/model/watcher.go b/pkg/model/watcher.go index 17f9371..91c890f 100644 --- a/pkg/model/watcher.go +++ b/pkg/model/watcher.go @@ -49,10 +49,7 @@ type WatchInfor interface { func (w *WatchInfo) GenUid() { if w.Uid == "" { - switch w.Website { - case CoachOutlet: - w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid) - } + w.Uid = fmt.Sprintf("coachOutlet_%s", w.Pid) } } diff --git a/pkg/watcher/coach.go b/pkg/watcher/coach.go index b4422ed..ecb1718 100644 --- a/pkg/watcher/coach.go +++ b/pkg/watcher/coach.go @@ -41,7 +41,6 @@ func (c *CoachOutlet) SetOption(cfg model.WatchInfo) { func (c *CoachOutlet) Cancel() { c.cancel() - c.db.Where("uid = ?", c.cfg.Uid).Model(c.cfg).Update("watch", false) } func (c *CoachOutlet) Restart() {