protected sealed override Result RunCore(T client, Argument[] args) { var status = RunJobCore(client, args).Result; var finalStatus = _schedulerWaiter.WaitForTaskToComplete(status); Logger.Info($"Finished running {finalStatus.Description}"); return(finalStatus.Result); }
protected sealed override Result RunCore(T client, Argument[] args) { var status = RunJobCore(client, args).Result; if (!args.HasArgumentLabeled("return:") || args.FindValueFromLabel("return:").Value != "immediately") { var finalStatus = _schedulerWaiter.WaitForTaskToComplete(status); Logger.Info($"Finished running {finalStatus.Description}"); return(finalStatus.Result); } else { Logger.Info("This job is configured not to wait for a response, so returning passed"); return(status.Result != null ? status.Result : Result.Successful()); } }