Fix Goroutine Leak of Environment Get

that was caused by creating an intermediate environment `fetchedEnvironment` when fetching the environments but not removing it in case that we just copy its configuration to the existing environment.
This commit is contained in:
Maximilian Paß
2023-09-11 10:22:19 +02:00
parent 460b8b2065
commit 59da36303c
8 changed files with 48 additions and 33 deletions

View File

@ -38,7 +38,8 @@ type ExecutionEnvironment interface {
// Register saves this environment at the executor.
Register() error
// Delete removes this environment and all it's runner from the executor and Poseidon itself.
Delete() error
// Iff local the environment is just removed from Poseidon without external escalation.
Delete(local bool) error
// Sample returns and removes an arbitrary available runner.
// ok is true iff a runner was returned.