public ActionResult RefreshHRUCharacteristics(ConfirmDialogFormViewModel viewModel) { if (!ModelState.IsValid) { return(ViewRefreshHRUCharacteristics(viewModel)); } BackgroundJob.Enqueue(() => ScheduledBackgroundJobLaunchHelper.RunLoadGeneratingUnitRefreshJob(null)); BackgroundJob.Enqueue(() => ScheduledBackgroundJobLaunchHelper.RunHRURefreshJob()); SetMessageForDisplay("HRU Characteristic refresh will run in the background."); return(new ModalDialogFormJsonResult()); }
public ContentResult TriggerHRURun() { BackgroundJob.Enqueue(() => ScheduledBackgroundJobLaunchHelper.RunHRURefreshJob()); return(Content("HRU refresh will run in the background")); }