public Uri InvokeTriggeredJob(string jobName, string arguments, string trigger) { TriggeredJob triggeredJob = GetJob(jobName); if (triggeredJob == null) { throw new JobNotFoundException($"Cannot find '{jobName}' triggered job"); } triggeredJob.CommandArguments = arguments; if (IsShuttingdown) { throw new WebJobsStoppedException(); } TriggeredJobRunner triggeredJobRunner = _triggeredJobRunners.GetOrAdd( jobName, _ => new TriggeredJobRunner(triggeredJob.Name, JobsBinariesPath, Environment, Settings, TraceFactory, Analytics)); JobSettings jobSettings = triggeredJob.Settings; string runId = triggeredJobRunner.StartJobRun(triggeredJob, jobSettings, trigger, ReportTriggeredJobFinished); ClearJobListCache(); return(BuildJobsUrl("{0}/history/{1}".FormatInvariant(jobName, runId))); }
public void InvokeTriggeredJob(string jobName, string arguments, string trigger) { TriggeredJob triggeredJob = GetJob(jobName); if (triggeredJob == null) { throw new JobNotFoundException(); } triggeredJob.CommandArguments = arguments; if (IsShuttingdown) { throw new WebJobsStoppedException(); } TriggeredJobRunner triggeredJobRunner = _triggeredJobRunners.GetOrAdd( jobName, _ => new TriggeredJobRunner(triggeredJob.Name, Environment, Settings, TraceFactory, Analytics)); JobSettings jobSettings = triggeredJob.Settings; triggeredJobRunner.StartJobRun(triggeredJob, jobSettings, trigger, ReportTriggeredJobFinished); ClearJobListCache(); }
public void InvokeTriggeredJob(string jobName) { TriggeredJob triggeredJob = GetJob(jobName); if (triggeredJob == null) { throw new JobNotFoundException(); } TriggeredJobRunner triggeredJobRunner = _triggeredJobRunners.GetOrAdd( jobName, _ => new TriggeredJobRunner(triggeredJob.Name, Environment, Settings, TraceFactory, Analytics)); triggeredJobRunner.StartJobRun(triggeredJob); }
public void InvokeTriggeredJob(string jobName) { TriggeredJob triggeredJob = GetJob(jobName); if (triggeredJob == null) { throw new JobNotFoundException(); } if (IsShuttingdown) { throw new WebJobsStoppedException(); } TriggeredJobRunner triggeredJobRunner = _triggeredJobRunners.GetOrAdd( jobName, _ => new TriggeredJobRunner(triggeredJob.Name, Environment, Settings, TraceFactory, Analytics)); triggeredJobRunner.StartJobRun(triggeredJob, ReportTriggeredJobFinished); }