You've already forked woodpecker
mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-11-29 21:48:14 +02:00
Improve agent backend loading and suppress expectable errors (#818)
* improve agent loop loading backend once * supress container not found or stopped warnings
This commit is contained in:
@@ -10,16 +10,15 @@ import (
|
||||
var engines map[string]types.Engine
|
||||
|
||||
func init() {
|
||||
loadedEngines := []types.Engine{
|
||||
docker.New(),
|
||||
// kubernetes.New(), // TODO: disabled for now as kubernetes backend has not been implemented yet
|
||||
}
|
||||
|
||||
engines = make(map[string]types.Engine)
|
||||
|
||||
// TODO: disabled for now as kubernetes backend has not been implemented yet
|
||||
// kubernetes
|
||||
// engine = kubernetes.New("", "", "")
|
||||
// engines[engine.Name()] = engine
|
||||
|
||||
// docker
|
||||
engine := docker.New()
|
||||
engines[engine.Name()] = engine
|
||||
for _, engine := range loadedEngines {
|
||||
engines[engine.Name()] = engine
|
||||
}
|
||||
}
|
||||
|
||||
func FindEngine(engineName string) (types.Engine, error) {
|
||||
|
||||
Reference in New Issue
Block a user