Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.6.3" />
<PackageVersion Include="TencentCloudSDK.Sms" Version="3.0.1273" />
<PackageVersion Include="TimeZoneConverter" Version="7.2.0" />
<PackageVersion Include="TickerQ" Version="10.1.1" />
<PackageVersion Include="TickerQ.Dashboard" Version="10.1.1" />
<PackageVersion Include="TickerQ.Utilities" Version="10.1.1" />
<PackageVersion Include="TickerQ.EntityFrameworkCore" Version="10.1.1" />
<PackageVersion Include="TickerQ" Version="10.2.0" />
<PackageVersion Include="TickerQ.Dashboard" Version="10.2.0" />
<PackageVersion Include="TickerQ.Utilities" Version="10.2.0" />
<PackageVersion Include="TickerQ.EntityFrameworkCore" Version="10.2.0" />
<PackageVersion Include="Unidecode.NET" Version="2.1.0" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.extensibility.execution" Version="2.9.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
await service.CleanupLogsAsync(genericContext, cancellationToken);
})));
}), 0));
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
return Task.CompletedTask;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
await service.CleanupLogsAsync(genericContext, cancellationToken);
})));
}), 0));
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
return Task.CompletedTask;
}
Expand Down Expand Up @@ -118,5 +118,5 @@ abpTickerQFunctionProvider.Functions.TryAdd(nameof(CleanupJobs), (string.Empty,
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
await service.CleanupLogsAsync(genericContext, cancellationToken);
})));
}), 0));
```
4 changes: 4 additions & 0 deletions docs/en/package-version-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
| Microsoft.IdentityModel.Protocols.OpenIdConnect | 8.14.0 | 8.16.0 | #25068 |
| Microsoft.IdentityModel.Tokens | 8.14.0 | 8.16.0 | #25068 |
| System.IdentityModel.Tokens.Jwt | 8.14.0 | 8.16.0 | #25068 |
| TickerQ | 10.1.1 | 10.2.0 | #25091 |
| TickerQ.Dashboard | 10.1.1 | 10.2.0 | #25091 |
| TickerQ.EntityFrameworkCore | 10.1.1 | 10.2.0 | #25091 |
| TickerQ.Utilities | 10.1.1 | 10.2.0 | #25091 |

## 10.3.0-preview

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ public override void OnApplicationInitialization(ApplicationInitializationContex
{
var abpBackgroundJobOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobOptions>>();
var abpBackgroundJobsTickerQOptions = context.ServiceProvider.GetRequiredService<IOptions<AbpBackgroundJobsTickerQOptions>>();
var tickerFunctionDelegates = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)>();
var tickerFunctionDelegates = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)>();
var requestTypes = new Dictionary<string, (string, Type)>();
foreach (var jobConfiguration in abpBackgroundJobOptions.Value.GetJobs())
{
var genericMethod = GetTickerFunctionDelegateMethod.MakeGenericMethod(jobConfiguration.ArgsType);
var tickerFunctionDelegate = (TickerFunctionDelegate)genericMethod.Invoke(null, [jobConfiguration.ArgsType])!;
var config = abpBackgroundJobsTickerQOptions.Value.GetConfigurationOrNull(jobConfiguration.JobType);
tickerFunctionDelegates.TryAdd(jobConfiguration.JobName, (string.Empty, config?.Priority ?? TickerTaskPriority.Normal, tickerFunctionDelegate));
tickerFunctionDelegates.TryAdd(jobConfiguration.JobName, (string.Empty, config?.Priority ?? TickerTaskPriority.Normal, tickerFunctionDelegate, config?.MaxConcurrency ?? 0));
requestTypes.TryAdd(jobConfiguration.JobName, (jobConfiguration.ArgsType.FullName, jobConfiguration.ArgsType)!);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ public class AbpBackgroundJobsTimeTickerConfiguration

public TickerTaskPriority? Priority { get; set; }

public int? MaxConcurrency { get; set; }

public RunCondition? RunCondition { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ public class AbpBackgroundWorkersCronTickerConfiguration
public int[]? RetryIntervals { get; set; }

public TickerTaskPriority? Priority { get; set; }

public int? MaxConcurrency { get; set; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public override async Task AddAsync(IBackgroundWorker worker, CancellationToken
{
var workerInvoker = new AbpTickerQPeriodicBackgroundWorkerInvoker(worker, serviceProvider);
await workerInvoker.DoWorkAsync(tickerFunctionContext, tickerQCancellationToken);
}));
}, config?.MaxConcurrency ?? 0));

AbpTickerQBackgroundWorkersProvider.BackgroundWorkers.Add(name!, new AbpTickerQCronBackgroundWorker
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ namespace Volo.Abp.TickerQ;

public class AbpTickerQFunctionProvider : ISingletonDependency
{
public Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)> Functions { get;}
public Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)> Functions { get;}
Comment thread
maliming marked this conversation as resolved.
Outdated

Comment thread
maliming marked this conversation as resolved.
Outdated
public Dictionary<string, (string, Type)> RequestTypes { get; }

public AbpTickerQFunctionProvider()
Comment thread
maliming marked this conversation as resolved.
Outdated
{
Functions = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate)>();
Functions = new Dictionary<string, (string, TickerTaskPriority, TickerFunctionDelegate, int)>();
RequestTypes = new Dictionary<string, (string, Type)>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public override Task OnPreApplicationInitializationAsync(ApplicationInitializati
var request = await TickerRequestProvider.GetRequestAsync<string>(tickerFunctionContext, cancellationToken);
var genericContext = new TickerFunctionContext<string>(tickerFunctionContext, request);
await service.CleanupLogsAsync(genericContext, cancellationToken);
})));
}), 0));
abpTickerQFunctionProvider.RequestTypes.TryAdd(nameof(CleanupJobs), (typeof(string).FullName, typeof(string)));
return Task.CompletedTask;
}
Expand Down
Loading