Merge pull request #3175 from abpframework/Cotur-Virtualization-BJobs

Make BackgroundJobs module services easily overridable by inheritance
pull/3178/head
Halil İbrahim Kalkan 5 years ago committed by GitHub
commit 63025110e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -48,7 +48,7 @@ namespace Volo.Abp.BackgroundJobs
/// </summary>
public virtual BackgroundJobPriority Priority { get; set; }
private BackgroundJobRecord()
protected BackgroundJobRecord()
{
}

@ -21,13 +21,13 @@ namespace Volo.Abp.BackgroundJobs.EntityFrameworkCore
Clock = clock;
}
public async Task<List<BackgroundJobRecord>> GetWaitingListAsync(int maxResultCount)
public virtual async Task<List<BackgroundJobRecord>> GetWaitingListAsync(int maxResultCount)
{
return await GetWaitingListQuery(maxResultCount)
.ToListAsync();
}
private IQueryable<BackgroundJobRecord> GetWaitingListQuery(int maxResultCount)
protected virtual IQueryable<BackgroundJobRecord> GetWaitingListQuery(int maxResultCount)
{
var now = Clock.Now;
return DbSet

@ -21,13 +21,13 @@ namespace Volo.Abp.BackgroundJobs.MongoDB
Clock = clock;
}
public async Task<List<BackgroundJobRecord>> GetWaitingListAsync(int maxResultCount)
public virtual async Task<List<BackgroundJobRecord>> GetWaitingListAsync(int maxResultCount)
{
return await GetWaitingListQuery(maxResultCount)
.ToListAsync();
}
private IMongoQueryable<BackgroundJobRecord> GetWaitingListQuery(int maxResultCount)
protected virtual IMongoQueryable<BackgroundJobRecord> GetWaitingListQuery(int maxResultCount)
{
var now = Clock.Now;
return GetMongoQueryable()

Loading…
Cancel
Save