perf: remove lc dependency

This commit is contained in:
2024-12-12 23:13:54 +03:30
parent 3912ecef44
commit d3fd04b20c
19 changed files with 182 additions and 500 deletions

View File

@@ -4,18 +4,19 @@ import (
"flink-kube-operator/internal/crd/v1alpha1"
"strings"
"gitea.com/logicamp/lc"
"flink-kube-operator/pkg"
"go.uber.org/zap"
)
func (job *ManagedJob) checkStatus() error {
if job.def.Status.JobId == nil {
lc.Logger.Debug("[managed-job] [status] no job id")
pkg.Logger.Debug("[managed-job] [status] no job id")
return v1alpha1.ErrNoJobId
}
statusResp, err := job.client.Job(*job.def.Status.JobId)
if err != nil {
lc.Logger.Debug("[managed-job] [status] cannot fetch status", zap.Error(err))
pkg.Logger.Debug("[managed-job] [status] cannot fetch status", zap.Error(err))
if strings.IndexAny(err.Error(), "http status not 2xx: 404") == 0 {
// job.updateState(jobState{
// JobId: job.state.JobId,