From 2fcd564362006988f3450cf2c5259871a75cd1ad Mon Sep 17 00:00:00 2001 From: kirari04 Date: Mon, 22 Jan 2024 21:17:08 +0100 Subject: [PATCH] added more often checks about new encodings --- services/Encoder.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/Encoder.go b/services/Encoder.go index f329d4b..b023d33 100755 --- a/services/Encoder.go +++ b/services/Encoder.go @@ -50,7 +50,7 @@ func Encoder() { limitChan = make(chan bool, config.ENV.MaxRunningEncodes) for { go loadEncodingTasks() - time.Sleep(time.Second * 60) + time.Sleep(time.Second * 10) } } @@ -95,6 +95,7 @@ func loadEncodingTasks() { Failed: false, }, "Encoding", "Ready", "Failed"). Order("id ASC"). + Limit(10). Find(&encodingSubs) if len(encodingSubs) > 0 { @@ -122,6 +123,7 @@ func loadEncodingTasks() { Failed: false, }, "Encoding", "Ready", "Failed"). Order("id ASC"). + Limit(10). Find(&encodingAudios) if len(encodingAudios) > 0 { @@ -149,6 +151,7 @@ func loadEncodingTasks() { Failed: false, }, "Encoding", "Ready", "Failed"). Order("id ASC"). + Limit(10). Find(&encodingQualitys) if len(encodingQualitys) > 0 {