Skip to content

Commit d6008c5

Browse files
committed
Upgrade TickerQ packages to 10.2.0
1 parent fdcd6fe commit d6008c5

10 files changed

Lines changed: 21 additions & 13 deletions

File tree

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@
183183
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
184184
<PackageVersion Include="TencentCloudSDK.Sms" Version="3.0.1273" />
185185
<PackageVersion Include="TimeZoneConverter" Version="7.2.0" />
186-
<PackageVersion Include="TickerQ" Version="10.1.1" />
187-
<PackageVersion Include="TickerQ.Dashboard" Version="10.1.1" />
188-
<PackageVersion Include="TickerQ.Utilities" Version="10.1.1" />
189-
<PackageVersion Include="TickerQ.EntityFrameworkCore" Version="10.1.1" />
186+
<PackageVersion Include="TickerQ" Version="10.2.0" />
187+
<PackageVersion Include="TickerQ.Dashboard" Version="10.2.0" />
188+
<PackageVersion Include="TickerQ.Utilities" Version="10.2.0" />
189+
<PackageVersion Include="TickerQ.EntityFrameworkCore" Version="10.2.0" />
190190
<PackageVersion Include="Unidecode.NET" Version="2.1.0" />
191191
<PackageVersion Include="xunit" Version="2.9.3" />
192192
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.3" />

docs/en/framework/infrastructure/background-jobs/tickerq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
101101
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
102102
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
103103
await service.CleanupLogsAsync(genericContext, cancellationToken);
104-
})));
104+
}), 0));
105105
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
106106
return Task.CompletedTask;
107107
}

docs/en/framework/infrastructure/background-workers/tickerq.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
8989
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
9090
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
9191
await service.CleanupLogsAsync(genericContext, cancellationToken);
92-
})));
92+
}), 0));
9393
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
9494
return Task.CompletedTask;
9595
}
@@ -118,5 +118,5 @@ abpTickerQFunctionProvider.Functions.TryAdd(nameof(CleanupJobs), (string.Empty,
118118
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
119119
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
120120
await service.CleanupLogsAsync(genericContext, cancellationToken);
121-
})));
121+
}), 0));
122122
```

docs/en/package-version-changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
| Microsoft.IdentityModel.Protocols.OpenIdConnect | 8.14.0 | 8.16.0 | #25068 |
99
| Microsoft.IdentityModel.Tokens | 8.14.0 | 8.16.0 | #25068 |
1010
| System.IdentityModel.Tokens.Jwt | 8.14.0 | 8.16.0 | #25068 |
11+
| TickerQ | 10.1.1 | 10.2.0 | #PR |
12+
| TickerQ.Dashboard | 10.1.1 | 10.2.0 | #PR |
13+
| TickerQ.EntityFrameworkCore | 10.1.1 | 10.2.0 | #PR |
14+
| TickerQ.Utilities | 10.1.1 | 10.2.0 | #PR |
1115

1216
## 10.3.0-preview
1317

framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo/Abp/BackgroundJobs/TickerQ/AbpBackgroundJobsTickerQModule.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
2323
{
2424
var abpBackgroundJobOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>();
2525
var abpBackgroundJobsTickerQOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobsTickerQOptions>>();
26-
var tickerFunctionDelegates = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)>();
26+
var tickerFunctionDelegates = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)>();
2727
var requestTypes = new Dictionary<string, (string, Type)>();
2828
foreach (var jobConfiguration in abpBackgroundJobOptions.Value.GetJobs())
2929
{
3030
var genericMethod = GetTickerFunctionDelegateMethod.MakeGenericMethod(jobConfiguration.ArgsType);
3131
var tickerFunctionDelegate = (TickerFunctionDelegate)genericMethod.Invoke(null, [jobConfiguration.ArgsType])!;
3232
var config = abpBackgroundJobsTickerQOptions.Value.GetConfigurationOrNull(jobConfiguration.JobType);
33-
tickerFunctionDelegates.TryAdd(jobConfiguration.JobName, (string.Empty, config?.Priority ?? TickerTaskPriority.Normal, tickerFunctionDelegate));
33+
tickerFunctionDelegates.TryAdd(jobConfiguration.JobName, (string.Empty, config?.Priority ?? TickerTaskPriority.Normal, tickerFunctionDelegate, config?.MaxConcurrency ?? 0));
3434
requestTypes.TryAdd(jobConfiguration.JobName, (jobConfiguration.ArgsType.FullName, jobConfiguration.ArgsType)!);
3535
}
3636

framework/src/Volo.Abp.BackgroundJobs.TickerQ/Volo/Abp/BackgroundJobs/TickerQ/AbpBackgroundJobsTimeTickerConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ public class AbpBackgroundJobsTimeTickerConfiguration
1010

1111
public TickerTaskPriority? Priority { get; set; }
1212

13+
public int? MaxConcurrency { get; set; }
14+
1315
public RunCondition? RunCondition { get; set; }
1416
}

framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo/Abp/BackgroundWorkers/TickerQ/AbpBackgroundWorkersCronTickerConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ public class AbpBackgroundWorkersCronTickerConfiguration
99
public int[]? RetryIntervals { get; set; }
1010

1111
public TickerTaskPriority? Priority { get; set; }
12+
13+
public int? MaxConcurrency { get; set; }
1214
}

framework/src/Volo.Abp.BackgroundWorkers.TickerQ/Volo/Abp/BackgroundWorkers/TickerQ/AbpTickerQBackgroundWorkerManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public override async Task AddAsync(IBackgroundWorker worker, CancellationToken
5757
{
5858
var workerInvoker = new AbpTickerQPeriodicBackgroundWorkerInvoker(worker, serviceProvider);
5959
await workerInvoker.DoWorkAsync(tickerFunctionContext, tickerQCancellationToken);
60-
}));
60+
}, config?.MaxConcurrency ?? 0));
6161

6262
AbpTickerQBackgroundWorkersProvider.BackgroundWorkers.Add(name!, new AbpTickerQCronBackgroundWorker
6363
{

framework/src/Volo.Abp.TickerQ/Volo/Abp/TickerQ/AbpTickerQFunctionProvider.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace Volo.Abp.TickerQ;
88

99
public class AbpTickerQFunctionProvider : ISingletonDependency
1010
{
11-
public Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)> Functions { get;}
11+
public Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)> Functions { get;}
1212

1313
public Dictionary<string, (string, Type)> RequestTypes { get; }
1414

1515
public AbpTickerQFunctionProvider()
1616
{
17-
Functions = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)>();
17+
Functions = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)>();
1818
RequestTypes = new Dictionary<string, (string, Type)>();
1919
}
2020
}

modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.TickerQ/DemoAppTickerQModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
8383
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
8484
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
8585
await service.CleanupLogsAsync(genericContext, cancellationToken);
86-
})));
86+
}), 0));
8787
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
8888
return Task.CompletedTask;
8989
}

0 commit comments

Comments
 (0)