Use jsoniter
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package torrent
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"math"
|
||||
@@ -296,11 +295,11 @@ func (t *TorrentManager) startRefreshJob() {
|
||||
for {
|
||||
<-time.After(time.Duration(t.Config.GetRefreshEverySeconds()) * time.Second)
|
||||
|
||||
checksum := t.getCurrentState()
|
||||
if t.latestState.equal(checksum) {
|
||||
continue
|
||||
}
|
||||
t.log.Infof("Detected changes! Refreshing %d torrents", checksum.TotalCount)
|
||||
// checksum := t.getCurrentState()
|
||||
// if t.latestState.equal(checksum) {
|
||||
// continue
|
||||
// }
|
||||
// t.log.Infof("Detected changes! Refreshing %d torrents", checksum.TotalCount)
|
||||
|
||||
t.RefreshTorrents()
|
||||
t.log.Info("Finished refreshing torrents")
|
||||
|
||||
Reference in New Issue
Block a user