Exemplo n.º 1
0
        private void DeleteScheduledJob(RunHangfireWorkflowDefinitionJobModel data)
        {
            var jobId = _jobStorage
                        .EnumerateScheduledJobs <RunHangfireWorkflowDefinitionJob, RunHangfireWorkflowDefinitionJobModel>(x => x.WorkflowDefinitionId == data.WorkflowDefinitionId && x.ActivityId == data.ActivityId)
                        .Select(x => x.Key)
                        .FirstOrDefault();

            if (jobId == null)
            {
                return;
            }

            DeleteScheduledJob(jobId);
        }