fix monitoring daily dispatch cap
This commit is contained in:
@@ -344,18 +344,8 @@ func shutdownSchedulerMetricsServer(server *http.Server, logger interface {
|
||||
}
|
||||
|
||||
func monitoringDailyRunOptions(jobCtx internalscheduler.JobRunContext) tenantapp.MonitoringDailyTaskRunOptions {
|
||||
maxDesktopDispatch := 0
|
||||
if jobCtx.Job != nil && jobCtx.Job.BatchSize != nil {
|
||||
maxDesktopDispatch = *jobCtx.Job.BatchSize
|
||||
}
|
||||
if maxDesktopDispatch <= 0 {
|
||||
maxDesktopDispatch = internalscheduler.AsInt(jobCtx.Config, "max_desktop_dispatch_per_run", 0)
|
||||
}
|
||||
if maxDesktopDispatch <= 0 {
|
||||
maxDesktopDispatch = internalscheduler.AsInt(jobCtx.Config, "batch_size", 0)
|
||||
}
|
||||
return tenantapp.MonitoringDailyTaskRunOptions{
|
||||
MaxDesktopDispatchPerRun: maxDesktopDispatch,
|
||||
MaxDesktopDispatchPerRun: internalscheduler.AsInt(jobCtx.Config, "max_desktop_dispatch_per_run", 0),
|
||||
MaxDesktopClientBacklog: internalscheduler.AsInt(jobCtx.Config, "max_desktop_client_backlog", 0),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user