Interface IBackgroundJobStore
Defines interface to store/get background jobs.
Namespace: Volo.Abp.BackgroundJobs
Assembly: Volo.Abp.BackgroundJobs.dll
Syntax
public interface IBackgroundJobStore
Methods
DeleteAsync(Guid)
Deletes a job.
Declaration
Task DeleteAsync(Guid jobId)
Parameters
Type | Name | Description |
---|---|---|
Guid | jobId | The Job Unique Identifier. |
Returns
Type | Description |
---|---|
Task |
FindAsync(Guid)
Gets a BackgroundJobInfo based on the given jobId.
Declaration
Task<BackgroundJobInfo> FindAsync(Guid jobId)
Parameters
Type | Name | Description |
---|---|---|
Guid | jobId | The Job Unique Identifier. |
Returns
Type | Description |
---|---|
Task<BackgroundJobInfo> | The BackgroundJobInfo object. |
GetWaitingJobsAsync(Int32)
Gets waiting jobs. It should get jobs based on these:
Conditions: !IsAbandoned And NextTryTime <= Clock.Now.
Order by: Priority DESC, TryCount ASC, NextTryTime ASC.
Maximum result: maxResultCount
.
Declaration
Task<List<BackgroundJobInfo>> GetWaitingJobsAsync(int maxResultCount)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxResultCount | Maximum result count. |
Returns
Type | Description |
---|---|
Task<List<BackgroundJobInfo>> |
InsertAsync(BackgroundJobInfo)
Inserts a background job.
Declaration
Task InsertAsync(BackgroundJobInfo jobInfo)
Parameters
Type | Name | Description |
---|---|---|
BackgroundJobInfo | jobInfo | Job information. |
Returns
Type | Description |
---|---|
Task |
UpdateAsync(BackgroundJobInfo)
Updates a job.
Declaration
Task UpdateAsync(BackgroundJobInfo jobInfo)
Parameters
Type | Name | Description |
---|---|---|
BackgroundJobInfo | jobInfo | Job information. |
Returns
Type | Description |
---|---|
Task |