Browse Source

Background job sample application and refactor.

pull/395/head
Halil ibrahim Kalkan 8 years ago
parent
commit
b4212f2861
  1. 2
      framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs
  2. 11
      framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AutoMapperObjectMapper.cs
  3. 2
      framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/MapperAccessor.cs
  4. 4
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs
  5. 23
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs
  6. 28
      framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs
  7. 12
      framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs
  8. 5
      framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs
  9. 68
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs
  10. 6
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/SampleJobCreator.cs
  11. 21
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleGreenJob.cs
  12. 8
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleGreenJobArgs.cs
  13. 13
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleJob.cs
  14. 21
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleYellowJob.cs
  15. 3
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleYellowJobArgs.cs
  16. 66
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20180724105416_BackgroundJobs_Initial.Designer.cs
  17. 41
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20180724105416_BackgroundJobs_Initial.cs
  18. 64
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs
  19. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Program.cs
  20. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj
  21. 4
      modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp/BackgroundJobs/BackgroundJobRecord.cs

2
framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AbpAutoMapperModule.cs

@ -26,7 +26,7 @@ namespace Volo.Abp.AutoMapper
context.Services.AddSingleton<MapperAccessor>(_ => mapperAccessor);
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
public override void OnPreApplicationInitialization(ApplicationInitializationContext context)
{
CreateMappings(context.ServiceProvider);
}

11
framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/AutoMapperObjectMapper.cs

@ -1,5 +1,4 @@
using System;
using AutoMapper;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectMapping;
@ -9,22 +8,22 @@ namespace Volo.Abp.AutoMapper
[Dependency(ServiceLifetime.Transient, ReplaceServices = true)]
public class AutoMapperObjectMapper : DefaultObjectMapper
{
private readonly IMapper _mapper;
protected IMapperAccessor MapperAccessor { get; }
public AutoMapperObjectMapper(IMapperAccessor mapper, IServiceProvider serviceProvider)
public AutoMapperObjectMapper(IMapperAccessor mapperAccessor, IServiceProvider serviceProvider)
: base(serviceProvider)
{
_mapper = mapper.Mapper;
MapperAccessor = mapperAccessor;
}
protected override TDestination AutoMap<TSource, TDestination>(object source)
{
return _mapper.Map<TDestination>(source);
return MapperAccessor.Mapper.Map<TDestination>(source);
}
protected override TDestination AutoMap<TSource, TDestination>(TSource source, TDestination destination)
{
return _mapper.Map(source, destination);
return MapperAccessor.Mapper.Map(source, destination);
}
}
}

2
framework/src/Volo.Abp.AutoMapper/Volo/Abp/AutoMapper/MapperAccessor.cs

@ -2,7 +2,7 @@ using AutoMapper;
namespace Volo.Abp.AutoMapper
{
public class MapperAccessor : IMapperAccessor
internal class MapperAccessor : IMapperAccessor
{
public IMapper Mapper { get; set; }
}

4
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobInfo.cs

@ -37,9 +37,9 @@ namespace Volo.Abp.BackgroundJobs
public virtual string JobName { get; set; }
/// <summary>
/// Job arguments as JSON string.
/// Job arguments as serialized to string.
/// </summary>
public virtual string JobArgs { get; set; } //TODO: Consider to conver to byte[]
public virtual string JobArgs { get; set; }
/// <summary>
/// Try count of this job.

23
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobOptions.cs

@ -3,16 +3,31 @@ using System.Collections.Generic;
namespace Volo.Abp.BackgroundJobs
{
//TODO: Move options related to default backgroundjob manager to another class
//TODO: Create Volo.Abp.BackgroundJobs.Abstractions package and move abstractions there!
public class BackgroundJobOptions
{
//TODO: Consider to automatically register jobs
public Dictionary<string, Type> JobTypes { get; }
public bool IsJobExecutionEnabled { get; set; }
/// <summary>
/// Default: true.
/// </summary>
public bool IsJobExecutionEnabled { get; set; } = true;
/// <summary>
/// Interval between polling jobs from <see cref="IBackgroundJobStore"/>.
/// Default value: 5000 (5 seconds).
/// </summary>
public int JobPollPeriod { get; set; }
/// <summary>
/// Maximum count of jobs to fetch from data store in one loop.
/// </summary>
public int MaxJobFetchCount { get; set; } = 1000;
public BackgroundJobOptions()
{
IsJobExecutionEnabled = true;
JobTypes = new Dictionary<string, Type>();
}

28
framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/BackgroundJobWorker.cs

@ -1,47 +1,35 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.Threading;
using Volo.Abp.Timing;
namespace Volo.Abp.BackgroundJobs
{
public class BackgroundJobWorker : PeriodicBackgroundWorkerBase, IBackgroundJobWorker, ISingletonDependency
{
/// <summary>
/// Interval between polling jobs from <see cref="IBackgroundJobStore"/>.
/// Default value: 5000 (5 seconds).
/// </summary>
public static int JobPollPeriod { get; set; } //TODO: Move to options
protected IBackgroundJobExecuter JobExecuter { get; }
protected IBackgroundJobStore Store { get; }
static BackgroundJobWorker()
{
JobPollPeriod = 5000;
}
protected BackgroundJobOptions Options { get; }
/// <summary>
/// Initializes a new instance of the <see cref="BackgroundJobManager"/> class.
/// </summary>
public BackgroundJobWorker(
IBackgroundJobStore store,
AbpTimer timer,
IBackgroundJobExecuter jobExecuter)
IBackgroundJobExecuter jobExecuter,
IOptions<BackgroundJobOptions> options)
: base(timer)
{
JobExecuter = jobExecuter;
Store = store;
Timer.Period = JobPollPeriod;
Options = options.Value;
Timer.Period = Options.JobPollPeriod;
}
protected override void DoWork()
{
var waitingJobs = AsyncHelper.RunSync(() => Store.GetWaitingJobsAsync(1000));
var waitingJobs = AsyncHelper.RunSync(() => Store.GetWaitingJobsAsync(Options.MaxJobFetchCount));
foreach (var job in waitingJobs)
{

12
framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerManager.cs

@ -10,40 +10,40 @@ namespace Volo.Abp.BackgroundWorkers
/// </summary>
public class BackgroundWorkerManager : RunnableBase, IBackgroundWorkerManager, ISingletonDependency, IDisposable
{
private readonly List<IBackgroundWorker> _backgroundJobs;
private readonly List<IBackgroundWorker> _backgroundWorkers;
/// <summary>
/// Initializes a new instance of the <see cref="BackgroundWorkerManager"/> class.
/// </summary>
public BackgroundWorkerManager()
{
_backgroundJobs = new List<IBackgroundWorker>();
_backgroundWorkers = new List<IBackgroundWorker>();
}
public override void Start()
{
base.Start();
_backgroundJobs.ForEach(job => job.Start());
_backgroundWorkers.ForEach(worker => worker.Start());
}
public override void Stop()
{
_backgroundJobs.ForEach(job => job.Stop());
_backgroundWorkers.ForEach(worker => worker.Stop());
base.Stop();
}
public override void WaitToStop()
{
_backgroundJobs.ForEach(job => job.WaitToStop());
_backgroundWorkers.ForEach(worker => worker.WaitToStop());
base.WaitToStop();
}
public void Add(IBackgroundWorker worker)
{
_backgroundJobs.Add(worker);
_backgroundWorkers.Add(worker);
if (IsRunning)
{

5
framework/src/Volo.Abp.BackgroundWorkers/Volo/Abp/BackgroundWorkers/BackgroundWorkerOptions.cs

@ -2,6 +2,9 @@
{
public class BackgroundWorkerOptions
{
public bool IsEnabled { get; set; }
/// <summary>
/// Default: true.
/// </summary>
public bool IsEnabled { get; set; } = true;
}
}

68
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs

@ -1,19 +1,83 @@
using Microsoft.Extensions.DependencyInjection;
using System.IO;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Modularity;
namespace Volo.Abp.BackgroundJobs.DemoApp
{
[DependsOn(
typeof(BackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAutofacModule)
typeof(AbpAutofacModule),
typeof(AbpEntityFrameworkCoreSqlServerModule)
)]
public class DemoAppModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = BuildConfiguration();
context.Services.AddConfiguration(configuration);
context.Services.Configure<DbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = configuration.GetConnectionString("Default");
});
context.Services.Configure<AbpDbContextOptions>(options =>
{
options.Configure(opts =>
{
opts.UseSqlServer();
});
});
context.Services.Configure<BackgroundJobOptions>(options =>
{
options.JobPollPeriod = 1000;
});
context.Services.AddAssemblyOf<DemoAppModule>();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
context
.ServiceProvider
.GetRequiredService<ILoggerFactory>()
.AddConsole(LogLevel.Debug);
}
private static IConfigurationRoot BuildConfiguration(string fileName = "appsettings")
{
var fileNameWithExtension = fileName + ".json";
var directory = Directory.GetCurrentDirectory();
while (!File.Exists(Path.Combine(directory, fileNameWithExtension)))
{
var parentDirectory = new DirectoryInfo(directory).Parent;
if (parentDirectory == null)
{
break;
}
directory = parentDirectory.FullName;
}
if(File.Exists(Path.Combine(directory, fileNameWithExtension)))
{
var builder = new ConfigurationBuilder()
.SetBasePath(directory)
.AddJsonFile(fileNameWithExtension, optional: false);
return builder.Build();
}
return null;
}
}
}

6
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/SampleJobCreator.cs

@ -13,8 +13,10 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
public void CreateJobs()
{
_backgroundJobManager.Enqueue(new WriteToConsoleJobArgs { Value = "42" });
_backgroundJobManager.Enqueue(new WriteToConsoleJobArgs { Value = "43" });
_backgroundJobManager.Enqueue(new WriteToConsoleGreenJobArgs { Value = "test 1 (green)" });
_backgroundJobManager.Enqueue(new WriteToConsoleGreenJobArgs { Value = "test 2 (green)" });
_backgroundJobManager.Enqueue(new WriteToConsoleYellowJobArgs { Value = "test 1 (yellow)" });
_backgroundJobManager.Enqueue(new WriteToConsoleYellowJobArgs { Value = "test 2 (yellow)" });
}
}
}

21
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleGreenJob.cs

@ -0,0 +1,21 @@
using System;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
{
public class WriteToConsoleGreenJob : BackgroundJob<WriteToConsoleGreenJobArgs>, ITransientDependency
{
public override void Execute(WriteToConsoleGreenJobArgs args)
{
if (RandomHelper.GetRandomOf(1, 2) == 2)
{
throw new ApplicationException("A sample exception from the WriteToConsoleGreenJob!");
}
var oldColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine($"############### WriteToConsoleGreenJob: {args.Value} ###############");
Console.ForegroundColor = oldColor;
}
}
}

8
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleGreenJobArgs.cs

@ -0,0 +1,8 @@
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
{
[BackgroundJobName("GreenJob")]
public class WriteToConsoleGreenJobArgs
{
public string Value { get; set; }
}
}

13
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleJob.cs

@ -1,13 +0,0 @@
using System;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
{
public class WriteToConsoleJob : BackgroundJob<WriteToConsoleJobArgs>, ITransientDependency
{
public override void Execute(WriteToConsoleJobArgs args)
{
Console.WriteLine($"WriteToConsoleJob: {args.Value}");
}
}
}

21
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleYellowJob.cs

@ -0,0 +1,21 @@
using System;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
{
public class WriteToConsoleYellowJob : BackgroundJob<WriteToConsoleYellowJobArgs>, ITransientDependency
{
public override void Execute(WriteToConsoleYellowJobArgs args)
{
if (RandomHelper.GetRandomOf(1, 2) == 2)
{
throw new ApplicationException("A sample exception from the WriteToConsoleYellowJob!");
}
var oldColor = Console.ForegroundColor;
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine($"############### WriteToConsoleYellowJob: {args.Value} ###############");
Console.ForegroundColor = oldColor;
}
}
}

3
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleJobArgs.cs → modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Jobs/WriteToConsoleYellowJobArgs.cs

@ -1,6 +1,7 @@
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
{
public class WriteToConsoleJobArgs
[BackgroundJobName("YellowJob")]
public class WriteToConsoleYellowJobArgs
{
public string Value { get; set; }
}

66
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20180724105416_BackgroundJobs_Initial.Designer.cs

@ -0,0 +1,66 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.BackgroundJobs.DemoApp.Db;
namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
[Migration("20180724105416_BackgroundJobs_Initial")]
partial class BackgroundJobs_Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-rtm-30799")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
#pragma warning restore 612, 618
}
}
}

41
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/20180724105416_BackgroundJobs_Initial.cs

@ -0,0 +1,41 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations
{
public partial class BackgroundJobs_Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpBackgroundJobs",
columns: table => new
{
Id = table.Column<Guid>(nullable: false),
JobName = table.Column<string>(maxLength: 128, nullable: false),
JobArgs = table.Column<string>(maxLength: 1048576, nullable: false),
TryCount = table.Column<short>(nullable: false, defaultValue: (short)0),
CreationTime = table.Column<DateTime>(nullable: false),
NextTryTime = table.Column<DateTime>(nullable: false),
LastTryTime = table.Column<DateTime>(nullable: true),
IsAbandoned = table.Column<bool>(nullable: false, defaultValue: false),
Priority = table.Column<byte>(nullable: false, defaultValue: (byte)15)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpBackgroundJobs", x => x.Id);
});
migrationBuilder.CreateIndex(
name: "IX_AbpBackgroundJobs_IsAbandoned_NextTryTime",
table: "AbpBackgroundJobs",
columns: new[] { "IsAbandoned", "NextTryTime" });
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpBackgroundJobs");
}
}
}

64
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Migrations/DemoAppDbContextModelSnapshot.cs

@ -0,0 +1,64 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.BackgroundJobs.DemoApp.Db;
namespace Volo.Abp.BackgroundJobs.DemoApp.Migrations
{
[DbContext(typeof(DemoAppDbContext))]
partial class DemoAppDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.1.0-rtm-30799")
.HasAnnotation("Relational:MaxIdentifierLength", 128)
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd();
b.Property<DateTime>("CreationTime")
.HasColumnName("CreationTime");
b.Property<bool>("IsAbandoned")
.ValueGeneratedOnAdd()
.HasDefaultValue(false);
b.Property<string>("JobArgs")
.IsRequired()
.HasMaxLength(1048576);
b.Property<string>("JobName")
.IsRequired()
.HasMaxLength(128);
b.Property<DateTime?>("LastTryTime");
b.Property<DateTime>("NextTryTime");
b.Property<byte>("Priority")
.ValueGeneratedOnAdd()
.HasDefaultValue((byte)15);
b.Property<short>("TryCount")
.ValueGeneratedOnAdd()
.HasDefaultValue((short)0);
b.HasKey("Id");
b.HasIndex("IsAbandoned", "NextTryTime");
b.ToTable("AbpBackgroundJobs");
});
#pragma warning restore 612, 618
}
}
}

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Program.cs

@ -22,6 +22,8 @@ namespace Volo.Abp.BackgroundJobs.DemoApp
Console.WriteLine("Press ENTER to stop the application..!");
Console.ReadLine();
application.Shutdown();
}
}
}

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj

@ -9,6 +9,8 @@
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.0" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\src\Volo.Abp.BackgroundJobs.EntityFrameworkCore\Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />

4
modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo.Abp/BackgroundJobs/BackgroundJobRecord.cs

@ -13,9 +13,9 @@ namespace Volo.Abp.BackgroundJobs
public virtual string JobName { get; set; }
/// <summary>
/// Job arguments as JSON string.
/// Job arguments as serialized string.
/// </summary>
public virtual string JobArgs { get; set; } //TODO: Consider to conver to byte[]
public virtual string JobArgs { get; set; }
/// <summary>
/// Try count of this job.

Loading…
Cancel
Save