Add depot, attendant, jetfire, optimus, ota services with kustomize overlays
This commit is contained in:
26
services/attendant/handlers/car_update_progress.go
Normal file
26
services/attendant/handlers/car_update_progress.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/fiskerinc/cloud-services/services/attendant/controllers"
|
||||
"github.com/fiskerinc/cloud-services/services/attendant/services"
|
||||
|
||||
"github.com/fiskerinc/cloud-services/pkg/common"
|
||||
"github.com/fiskerinc/cloud-services/pkg/logger"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func CarUpdateProgressStatus(db *services.DB, ka *services.KeepAwake, device common.Device, id string, data []byte) error {
|
||||
logger.Debug().Msgf("CarUpdateProgressStatus %v %s", device, id)
|
||||
|
||||
clientPool := services.RedisClientPool()
|
||||
|
||||
handler := controllers.NewCarUpdateProgress(clientPool, ka, db, device)
|
||||
if handler == nil {
|
||||
return errors.Errorf("NewCarUpdateProgress cannot handle device %v", device)
|
||||
}
|
||||
defer handler.Dispose()
|
||||
|
||||
err := handler.Process(id, data)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user