pkg/jobqueue: add arch to worker

This commit is contained in:
Sanne Raymaekers 2023-12-08 12:20:36 +01:00
parent 8a8b1406fb
commit ac854b7cc8
4 changed files with 28 additions and 16 deletions

View file

@ -88,7 +88,7 @@ type JobQueue interface {
UpdateWorkerStatus(workerID uuid.UUID) error
// Get a list of workers which haven't been updated in the specified time frame
Workers(olderThan time.Duration) ([]uuid.UUID, error)
Workers(olderThan time.Duration) ([]Worker, error)
// Deletes the worker
DeleteWorker(workerID uuid.UUID) error
@ -115,3 +115,8 @@ var (
ErrActiveJobs = errors.New("worker has active jobs associated with it")
ErrWorkerNotExist = errors.New("worker does not exist")
)
type Worker struct {
ID uuid.UUID
Arch string
}