mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-23 13:33:44 +08:00
Setting cronWorkflow values during server create request,
from the request data.
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user