Nonblocking disabled

This commit is contained in:
Ben Sarmiento
2024-01-28 18:36:57 +01:00
parent 0678af2bc2
commit 3cf3351210
2 changed files with 4 additions and 4 deletions

View File

@@ -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"),
} }

View File

@@ -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)