Nonblocking disabled
This commit is contained in:
@@ -51,7 +51,7 @@ func MainApp(configPath string) {
|
|||||||
premium.MonitorPremiumStatus(rd, zurglog)
|
premium.MonitorPremiumStatus(rd, zurglog)
|
||||||
|
|
||||||
workerOptions := ants.Options{
|
workerOptions := ants.Options{
|
||||||
Nonblocking: true,
|
// Nonblocking: true,
|
||||||
PanicHandler: func(i interface{}) {},
|
PanicHandler: func(i interface{}) {},
|
||||||
Logger: log.Named("worker"),
|
Logger: log.Named("worker"),
|
||||||
}
|
}
|
||||||
@@ -64,7 +64,7 @@ func MainApp(configPath string) {
|
|||||||
defer workerPool.Release()
|
defer workerPool.Release()
|
||||||
|
|
||||||
refreshOptions := ants.Options{
|
refreshOptions := ants.Options{
|
||||||
Nonblocking: true,
|
// Nonblocking: true,
|
||||||
PanicHandler: func(i interface{}) {},
|
PanicHandler: func(i interface{}) {},
|
||||||
Logger: log.Named("refreshworker"),
|
Logger: log.Named("refreshworker"),
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ func MainApp(configPath string) {
|
|||||||
defer refreshPool.Release()
|
defer refreshPool.Release()
|
||||||
|
|
||||||
repairOptions := ants.Options{
|
repairOptions := ants.Options{
|
||||||
Nonblocking: true,
|
// Nonblocking: true,
|
||||||
PanicHandler: func(i interface{}) {},
|
PanicHandler: func(i interface{}) {},
|
||||||
Logger: log.Named("repairworker"),
|
Logger: log.Named("repairworker"),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ func (t *TorrentManager) refreshTorrents() []string {
|
|||||||
|
|
||||||
// startRefreshJob periodically refreshes the torrents
|
// startRefreshJob periodically refreshes the torrents
|
||||||
func (t *TorrentManager) startRefreshJob() {
|
func (t *TorrentManager) startRefreshJob() {
|
||||||
_ = t.workerPool.Submit(func() {
|
_ = t.refreshPool.Submit(func() {
|
||||||
t.log.Info("Starting periodic refresh job")
|
t.log.Info("Starting periodic refresh job")
|
||||||
for {
|
for {
|
||||||
<-time.After(time.Duration(t.Config.GetRefreshEverySecs()) * time.Second)
|
<-time.After(time.Duration(t.Config.GetRefreshEverySecs()) * time.Second)
|
||||||
|
|||||||
Reference in New Issue
Block a user