feat: retry upload on jar not found

This commit is contained in:
2024-12-08 01:24:14 +03:30
parent 5abc044d69
commit 91ccfebfeb
3 changed files with 79 additions and 38 deletions

View File

@@ -37,10 +37,11 @@ func (job *ManagedJob) upload() error {
// run the job from saved jarId in managedJob
func (job *ManagedJob) run() error {
if job.def.Status.JarId == nil {
err := errors.New("missing jar id")
err := errors.New("missing jar id")
lc.Logger.Error("[managed-job] [run]", zap.Error(err))
return err
}
lc.Logger.Info("[managed-job] [run] starting job", zap.String("name", job.def.GetName()))
runJarResp, err := job.client.RunJar(api.RunOpts{
JarID: *job.def.Status.JarId,
AllowNonRestoredState: true,