mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
Handle unimplemented job type
This commit is contained in:
@@ -1023,7 +1023,8 @@ func (e *Engine) receiveJobEvents() {
|
|||||||
resp.WorkloadResults = bundleResult
|
resp.WorkloadResults = bundleResult
|
||||||
return &resp
|
return &resp
|
||||||
default:
|
default:
|
||||||
return nil
|
resp.Reason = []byte(jobexec.ErrJobNotImplemented.Error())
|
||||||
|
return &resp
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package jobexec
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
@@ -10,6 +11,10 @@ import (
|
|||||||
"github.com/netbirdio/netbird/upload-server/types"
|
"github.com/netbirdio/netbird/upload-server/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
ErrJobNotImplemented = errors.New("job not implemented")
|
||||||
|
)
|
||||||
|
|
||||||
type Executor struct {
|
type Executor struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user