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
1cf4f520f8
commit
cb3555f5ed
@ -180,8 +180,8 @@ func workerPoolDo[I any, O any](job *workerPoolJob[I, O]) ([]O, []error, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(job.data) == 1 {
|
if len(job.data) == 1 {
|
||||||
output, err := job.task(job.data[0])
|
results[0], errs[0] = job.task(job.data[0])
|
||||||
return append(results, output), append(errs, err), nil
|
return results, errs, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
tasksQueue := make(chan *workerPoolTask[I, O])
|
tasksQueue := make(chan *workerPoolTask[I, O])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user