feat: remove buntdb dep
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package managed_job
|
||||
|
||||
import (
|
||||
"flink-kube-operator/internal/crd/v1alpha1"
|
||||
"flink-kube-operator/internal/jar"
|
||||
|
||||
"gitea.com/logicamp/lc"
|
||||
@@ -40,12 +41,23 @@ func (job *ManagedJob) run() error {
|
||||
}
|
||||
lc.Logger.Debug("[main] after run jar", zap.Any("run-jar-resp", runJarResp))
|
||||
|
||||
if job.state == nil {
|
||||
job.state = &jobState{}
|
||||
}
|
||||
job.state.JobId = &runJarResp.JobId
|
||||
job.state.Status = JobStatusCreating
|
||||
job.updateState(*job.state)
|
||||
// if job.state == nil {
|
||||
// job.state = &jobState{}
|
||||
// }
|
||||
// job.state.JobId = &runJarResp.JobId
|
||||
// job.state.Status = v1alpha1.JobStatusCreating
|
||||
// job.updateState(*job.state)
|
||||
// job.crd.SetJobStatus(job.def.UID, v1alpha1.FlinkJobStatus{
|
||||
// JobId: job.state.JobId,
|
||||
// })
|
||||
job.crd.Patch(job.def.UID, map[string]interface{}{
|
||||
"status": map[string]interface{}{
|
||||
"jobId": &runJarResp.JobId,
|
||||
"jobStatus": v1alpha1.JobStatusCreating,
|
||||
"lifeCycleStatus": v1alpha1.LifeCycleStatusInitializing,
|
||||
"error": nil,
|
||||
},
|
||||
})
|
||||
//job.updateState(jobState{JobId: &runJarResp.JobId, Status: JobStatusCreating})
|
||||
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user