Browse Source

CancellationToken parameter added for background jobs demo app

pull/15282/head
ahmetfarukulu 4 years ago
parent
commit
638c113a1f
  1. 3
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/WriteToConsoleGreenJob.cs
  2. 3
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Jobs/WriteToConsoleYellowJob.cs

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

@ -1,11 +1,12 @@
using System;
using System.Threading;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.BackgroundJobs.DemoApp.Shared.Jobs
{
public class WriteToConsoleGreenJob : BackgroundJob<WriteToConsoleGreenJobArgs>, ITransientDependency
{
public override void Execute(WriteToConsoleGreenJobArgs args)
public override void Execute(WriteToConsoleGreenJobArgs args, CancellationToken cancellationToken = default)
{
if (RandomHelper.GetRandom(0, 100) < 70)
{

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

@ -1,11 +1,12 @@
using System;
using System.Threading;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.BackgroundJobs.DemoApp.Shared.Jobs
{
public class WriteToConsoleYellowJob : BackgroundJob<WriteToConsoleYellowJobArgs>, ITransientDependency
{
public override void Execute(WriteToConsoleYellowJobArgs args)
public override void Execute(WriteToConsoleYellowJobArgs args, CancellationToken cancellationToken = default)
{
if (RandomHelper.GetRandom(0, 100) < 70)
{

Loading…
Cancel
Save