Refactor NewAbstractManager

to require a context used for the monitoring.
This commit is contained in:
Maximilian Paß
2023-09-04 11:44:36 +02:00
parent b28b87d56f
commit 0d6b4f660c
7 changed files with 34 additions and 17 deletions

View File

@ -1,6 +1,7 @@
package runner
import (
"context"
"fmt"
"github.com/openHPI/poseidon/pkg/dto"
"time"
@ -11,8 +12,8 @@ type AWSRunnerManager struct {
}
// NewAWSRunnerManager creates a new runner manager that keeps track of all runners at AWS.
func NewAWSRunnerManager() *AWSRunnerManager {
return &AWSRunnerManager{NewAbstractManager()}
func NewAWSRunnerManager(ctx context.Context) *AWSRunnerManager {
return &AWSRunnerManager{NewAbstractManager(ctx)}
}
func (a AWSRunnerManager) Claim(id dto.EnvironmentID, duration int) (Runner, error) {