perf: remove lc dependency
This commit is contained in:
@@ -6,7 +6,8 @@ import (
|
||||
"flink-kube-operator/internal/managed_job"
|
||||
"time"
|
||||
|
||||
"gitea.com/logicamp/lc"
|
||||
"flink-kube-operator/pkg"
|
||||
|
||||
api "github.com/logi-camp/go-flink-client"
|
||||
"github.com/samber/lo"
|
||||
"go.uber.org/zap"
|
||||
@@ -43,7 +44,7 @@ func NewManager(client *api.Client, crdInstance *crd.Crd) Manager {
|
||||
func (mgr *Manager) cycle(client *api.Client, crdInstance *crd.Crd) {
|
||||
jobManagerJobOverviews, jobManagerJobStatusError := mgr.client.JobsOverview()
|
||||
if jobManagerJobStatusError != nil {
|
||||
lc.Logger.Error("[manager] [cycle] cannot check flink jobs status", zap.Error(jobManagerJobStatusError))
|
||||
pkg.Logger.Error("[manager] [cycle] cannot check flink jobs status", zap.Error(jobManagerJobStatusError))
|
||||
crdInstance.PatchAll(map[string]interface{}{
|
||||
"status": map[string]interface{}{
|
||||
"jobStatus": "",
|
||||
@@ -51,7 +52,7 @@ func (mgr *Manager) cycle(client *api.Client, crdInstance *crd.Crd) {
|
||||
},
|
||||
})
|
||||
}
|
||||
//lc.Logger.Debug("[manager] [cycle] overviews", zap.Any("overviews", jobsOverviews))
|
||||
//pkg.Logger.Debug("[manager] [cycle] overviews", zap.Any("overviews", jobsOverviews))
|
||||
|
||||
// Loop over job definitions as Kubernetes CRD
|
||||
for _, uid := range crd.GetAllJobKeys() {
|
||||
@@ -78,7 +79,7 @@ func (mgr *Manager) cycle(client *api.Client, crdInstance *crd.Crd) {
|
||||
return false
|
||||
})
|
||||
if ok {
|
||||
lc.Logger.Debug("[manager] read status from flink", zap.String("name", jobManagerJobOverview.Name), zap.String("state", jobManagerJobOverview.State))
|
||||
pkg.Logger.Debug("[manager] read status from flink", zap.String("name", jobManagerJobOverview.Name), zap.String("state", jobManagerJobOverview.State))
|
||||
var jobLifeCycleStatus *string
|
||||
if jobManagerJobOverview.State == string(v1alpha1.JobStatusRunning) {
|
||||
status := string(v1alpha1.LifeCycleStatusHealthy)
|
||||
|
||||
Reference in New Issue
Block a user