mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
613 B
21 lines
613 B
using Volo.Abp.DependencyInjection;
|
|
|
|
namespace Volo.Abp.BackgroundJobs.DemoApp.Jobs
|
|
{
|
|
public class SampleJobCreator : ITransientDependency
|
|
{
|
|
private readonly IBackgroundJobManager _backgroundJobManager;
|
|
|
|
public SampleJobCreator(IBackgroundJobManager backgroundJobManager)
|
|
{
|
|
_backgroundJobManager = backgroundJobManager;
|
|
}
|
|
|
|
public void CreateJobs()
|
|
{
|
|
_backgroundJobManager.Enqueue(new WriteToConsoleJobArgs { Value = "42" });
|
|
_backgroundJobManager.Enqueue(new WriteToConsoleJobArgs { Value = "43" });
|
|
}
|
|
}
|
|
}
|