mirror of
https://github.com/glanceapp/glance.git
synced 2025-06-21 18:31:24 +02:00
Fix bug when making single request in job
This commit is contained in:
parent
50e1da01fe
commit
03b616622e
@ -182,8 +182,8 @@ func workerPoolDo[I any, O any](job *workerPoolJob[I, O]) ([]O, []error, error)
|
||||
}
|
||||
|
||||
if len(job.data) == 1 {
|
||||
output, err := job.task(job.data[0])
|
||||
return append(results, output), append(errs, err), nil
|
||||
results[0], errs[0] = job.task(job.data[0])
|
||||
return results, errs, nil
|
||||
}
|
||||
|
||||
tasksQueue := make(chan *workerPoolTask[I, O])
|
||||
|
Loading…
x
Reference in New Issue
Block a user