Files
2026-03-24 15:26:03 -05:00

35 lines
1.7 KiB
C#

using System.Collections.Generic;
using LCU.Library.Internal.DispatcherModels.Enums;
using LCU.Library.Internal.DispatcherModels.Models.Requests;
using LCU.Library.Internal.DispatcherModels.Models.Results;
namespace LCU.Api.Internal.Dispatcher.Services;
public interface IJobService
{
Task<PagedResult<Job>> GetFilteredJobs(Filter filter);
Task<IEnumerable<Job>> GetAsync();
Task<IEnumerable<Job>> GetInactiveAsync();
Task<IEnumerable<Job>> GetInactiveExcludeSoftDeletedTrackedAsync();
Task<IEnumerable<Job>> GetSoftDeletedTrackedAsync(DateTime cutOffDate);
Task<Job> GetByIdAsync(int id);
Task<Job> GetByIdExcludingWorkItemsAsync(int id);
Task<Job> GetByWorkItemIdAsync(int workItemId);
Task<Job> GetByWorkItemIdExcludingWorkItemsAsync(int workItemId);
Task<Job> GetByWorkItemIdExcludingWorkItemsIncludeErrorRecipientsAsync(int workItemId);
Task<IEnumerable<Job>> GetJobsReadyToBeScheduled();
Task<IEnumerable<Job>> GetErrorMonitoringJobs();
Task<Job> SaveAsync(Job job);
Task CompleteJobAndWorkItem(Job job, WorkItemExecution currentWorkItemExecution, StatusType finalStatus);
Task CompleteWorkItemAndContinueProcessingJob(Job job, WorkItemExecution currentWorkItemExecution, StatusType finalStatus);
Task<Job> UpdateAsync(Job job);
Task<Job> UpdateExcludingWorkItemsAsyncWithoutSave(Job job);
Task<Job> RemoveSoftDeleteById(int id);
Task<Job> RunJobNowAsync(Job job);
Task<Job> RunJobNowByIdAsync(int id);
Task<Job> DeactivateJobAsync(Job job);
Task<Job> RescheduleJobAsync(Job job);
Task DeleteAsync(int jobId);
Task DeleteFromCleanupAsync(Job job);
Task<Job> CopyJobAsync(CopyJobRequest request);
}