mirror of
https://github.com/ChuckNorrison/LightningTipBot.git
synced 2026-08-13 12:33:14 +02:00
Merge pull request #401 from LightningTipBot/dalle_timeout_increase
Dalle timeout increase
This commit is contained in:
commit
c21d42d1e8
1 changed files with 2 additions and 2 deletions
|
|
@ -122,7 +122,7 @@ func (bot *TipBot) generateDalleImages(event Event) {
|
|||
return
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*3)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), time.Minute*10)
|
||||
defer cancel()
|
||||
// generate a task to create an image with a prompt
|
||||
task, err := dalleClient.Generate(ctx, invoiceEvent.CallbackData)
|
||||
|
|
@ -133,7 +133,7 @@ func (bot *TipBot) generateDalleImages(event Event) {
|
|||
}
|
||||
// poll the task.ID until status is succeeded
|
||||
var t *dalle.Task
|
||||
timeout := time.After(90 * time.Second)
|
||||
timeout := time.After(5 * time.Minute)
|
||||
ticker := time.Tick(5 * time.Second)
|
||||
// Keep trying until we're timed out or get a result/error
|
||||
for {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue