Setting cronWorkflow values during server create request,

from the request data.
This commit is contained in:
Aleksandr Melnikov
2020-03-26 23:53:07 -07:00
parent e1892d6527
commit aab8b4a69b

View File

@@ -48,11 +48,18 @@ func (c *CronWorkflowServer) CreateCronWorkflow(ctx context.Context, req *api.Cr
}) })
} }
cronWorkflow := &v1.CronWorkflow{ cronWorkflow := v1.CronWorkflow{
Schedule: req.CronWorkflow.Schedule,
Timezone: req.CronWorkflow.Timezone,
Suspend: req.CronWorkflow.Suspend,
ConcurrencyPolicy: req.CronWorkflow.ConcurrencyPolicy,
StartingDeadlineSeconds: &req.CronWorkflow.StartingDeadlineSeconds,
SuccessfulJobsHistoryLimit: &req.CronWorkflow.SuccessfulJobsHistoryLimit,
FailedJobsHistoryLimit: &req.CronWorkflow.FailedJobsHistoryLimit,
WorkflowExecution: workflow, WorkflowExecution: workflow,
} }
cwf, err := client.CreateCronWorkflow(req.Namespace, cronWorkflow) cwf, err := client.CreateCronWorkflow(req.Namespace, &cronWorkflow)
if err != nil { if err != nil {
return nil, err return nil, err
} }