Add depot, attendant, jetfire, optimus, ota services with kustomize overlays
This commit is contained in:
24
services/depot/handlers/trex_del.go
Normal file
24
services/depot/handlers/trex_del.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/fiskerinc/cloud-services/services/depot/services"
|
||||
|
||||
"github.com/fiskerinc/cloud-services/pkg/redis"
|
||||
)
|
||||
|
||||
func TRexDel(id string) error {
|
||||
client := services.RedisClientPool().GetFromPool()
|
||||
defer client.Close()
|
||||
|
||||
err := removeTRexSession(client, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func removeTRexSession(client redis.Client, id string) error {
|
||||
_, err := client.Execute("SREM", redis.CarSessionsKey(), id)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user