parent
d8c3504aa7
commit
9aeee3a15d
|
|
@ -101,7 +101,11 @@ namespace Elsa.Activities.Temporal.Hangfire.Services
|
|||
_recurringJobManager.RemoveIfExists(job.Id);
|
||||
}
|
||||
|
||||
private IEnumerable<RecurringJobDto> QueryRecurringJobs() => _jobStorage.GetConnection().GetRecurringJobs().Where(x => x.Job.Type == typeof(RunHangfireWorkflowDefinitionJob));
|
||||
private IEnumerable<RecurringJobDto> QueryRecurringJobs() {
|
||||
using (var connection = _jobStorage.GetConnection())
|
||||
return connection.GetRecurringJobs().Where(x => x.Job.Type == typeof(RunHangfireWorkflowDefinitionJob));
|
||||
}
|
||||
|
||||
private static RunHangfireWorkflowDefinitionJobModel GetJobModel(Job job) => (RunHangfireWorkflowDefinitionJobModel) job.Args[0];
|
||||
|
||||
private static RunHangfireWorkflowDefinitionJobModel CreateData(string workflowDefinitionId, string activityId, string? cronExpression = default) => new(workflowDefinitionId, activityId, cronExpression);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,11 @@ namespace Elsa.Activities.Temporal.Hangfire.Services
|
|||
_recurringJobManager.RemoveIfExists(job.Id);
|
||||
}
|
||||
|
||||
private IEnumerable<RecurringJobDto> QueryRecurringJobs() => _jobStorage.GetConnection().GetRecurringJobs().Where(x => x.Job.Type == typeof(RunHangfireWorkflowInstanceJob));
|
||||
private IEnumerable<RecurringJobDto> QueryRecurringJobs() {
|
||||
using (var connection = _jobStorage.GetConnection())
|
||||
return connection.GetRecurringJobs().Where(x => x.Job.Type == typeof(RunHangfireWorkflowInstanceJob));
|
||||
}
|
||||
|
||||
private static RunHangfireWorkflowInstanceJobModel GetJobModel(Job job) => (RunHangfireWorkflowInstanceJobModel) job.Args[0];
|
||||
private static RunHangfireWorkflowInstanceJobModel CreateData(string workflowInstanceId, string activityId, string? cronExpression = default) => new(workflowInstanceId, activityId, cronExpression);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue