Skip to content

Commit

Permalink
added more often checks about new encodings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirari04 committed Jan 22, 2024
1 parent 7cf5feb commit 2fcd564
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/Encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down Expand Up @@ -95,6 +95,7 @@ func loadEncodingTasks() {
Failed: false,
}, "Encoding", "Ready", "Failed").
Order("id ASC").
Limit(10).
Find(&encodingSubs)

if len(encodingSubs) > 0 {
Expand Down Expand Up @@ -122,6 +123,7 @@ func loadEncodingTasks() {
Failed: false,
}, "Encoding", "Ready", "Failed").
Order("id ASC").
Limit(10).
Find(&encodingAudios)

if len(encodingAudios) > 0 {
Expand Down Expand Up @@ -149,6 +151,7 @@ func loadEncodingTasks() {
Failed: false,
}, "Encoding", "Ready", "Failed").
Order("id ASC").
Limit(10).
Find(&encodingQualitys)

if len(encodingQualitys) > 0 {
Expand Down

0 comments on commit 2fcd564

Please sign in to comment.