mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-05 23:05:45 +00:00
Clean the repository cache if it is in incomplete state (#595)
This commit is contained in:
1 parent
465fbba7d1
commit
010e459e95
3 files changed
+49
-11
No files matched your search
@@ -105,17 +105,17 @@ func NewParallelExecutor(executors ...Executor) Executor {
|
||||
}()
|
||||
}
|
||||
|
||||
// Executor waits all executors to cleanup these resources.
|
||||
var firstErr error
|
||||
for i := 0; i < len(executors); i++ {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return ctx.Err()
|
||||
case err := <-errChan:
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if err := <-errChan; err != nil && firstErr == nil {
|
||||
firstErr = err
|
||||
}
|
||||
}
|
||||
return nil
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
return firstErr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user