Skip to content

Commit

Permalink
Merge pull request #42 from SmilyOrg/disable-ai-load
Browse files Browse the repository at this point in the history
Disable loading AI if not available
  • Loading branch information
SmilyOrg authored Oct 11, 2022
2 parents 747e9b9 + 126f303 commit 71ab607
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions internal/image/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,15 @@ func NewSource(config Config, migrations embed.FS) *Source {
go source.ColorQueue.Run()

source.Clip = config.AI

source.AIQueue = queue.Queue{
ID: "load_ai",
Name: "load ai",
Worker: source.loadInfosAI,
WorkerCount: 8,
if config.AI.Available() {
source.AIQueue = queue.Queue{
ID: "load_ai",
Name: "load ai",
Worker: source.loadInfosAI,
WorkerCount: 8,
}
go source.AIQueue.Run()
}
go source.AIQueue.Run()
}

return &source
Expand Down

0 comments on commit 71ab607

Please sign in to comment.