Itmo.Dev.Platform.BackgroundTasks
1.1.75
Prefix Reserved
See the version list below for details.
dotnet add package Itmo.Dev.Platform.BackgroundTasks --version 1.1.75
NuGet\Install-Package Itmo.Dev.Platform.BackgroundTasks -Version 1.1.75
<PackageReference Include="Itmo.Dev.Platform.BackgroundTasks" Version="1.1.75" />
paket add Itmo.Dev.Platform.BackgroundTasks --version 1.1.75
#r "nuget: Itmo.Dev.Platform.BackgroundTasks, 1.1.75"
// Install Itmo.Dev.Platform.BackgroundTasks as a Cake Addin #addin nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.1.75 // Install Itmo.Dev.Platform.BackgroundTasks as a Cake Tool #tool nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.1.75
Itmo.Dev.Platform.BackgroundTasks
ExecutionMetadata
Execution metadata used for restoring task's execution progress from the point it was suspended.
Suspension can occur when task execution is cancelled due to application shutdown (when OperationCancelledException or TaskCancelledException is thrown).
In this case, execution metadata is persisted and would be loaded when task execution proceeds (when application is restarted).
You can use mutable model as execution metadata, modifying it as the execution process goes.
To avoid repeating operation execution (ensuring idempotency) modify execution metadata only when changes are persisted,
ex: transaction is committed and you update page token of some long running operataion.
Configuration
collection.AddPlatformBackgroundTasks(backgroundTaskBuilder => backgroundTaskBuilder
.ConfigurePersistence(persistenceConfiguration)
.ConfigureScheduling(schedulingConfiguration)
.ConfigureExecution(executionConfiguration)
.AddBackgroundTask(task => task
.WithMetadata<TestBackgroundTaskMetadata>()
.WithResult<TestBackgroundTaskResult>()
.WithError<EmptyError>()
.HandleBy<TestBackgroundTask>()));
Schema
Persistence configuration
{
"SchemaName": string
}
- SchemaName
Name of a PostgreSQL schema to store background task data
Scheduling configuration
{
"BatchSize": int,
"PollingDelay": timespan,
"CancellationCheckInterval": timespan,
"SchedulerRetryCount": int,
"SchedulerRetryDelays": [int]
}
- BatchSize
Number of tasks fetched per enqueuing run - PollingDelay
Delay between enqueuing runs - CancellationCheckInterval
Delay between cancellation checks - SchedulerRetryCount
Count of retries that hangfire will do, before marking task failed - SchedulerRetryDelays
Delay between hangfire retries, index corresponds to retry number
Execution configuration
{
"MaxRetryCount": int
}
- MaxRetryCount
Count of enqueueing retries for before task is moved into failed state
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net7.0
- Hangfire.AspNetCore (>= 1.8.6)
- Hangfire.PostgreSql (>= 1.20.4)
- Itmo.Dev.Platform.Common (>= 1.1.75)
- Itmo.Dev.Platform.Postgres (>= 1.1.75)
- Microsoft.Extensions.Hosting (>= 7.0.1)
- Newtonsoft.Json (>= 13.0.3)
- SourceKit.Generators.Builder (>= 1.0.4)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Itmo.Dev.Platform.BackgroundTasks:
Package | Downloads |
---|---|
Itmo.Dev.Platform.BackgroundTasks.Hangfire
Package Description |
|
Itmo.Dev.Platform.BackgroundTasks.Postgres
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.2.234 | 59 | 11/18/2024 |
2.2.204 | 122 | 10/29/2024 |
2.2.202 | 87 | 10/29/2024 |
2.1.196 | 93 | 10/29/2024 |
2.1.193 | 69 | 10/29/2024 |
2.1.190 | 71 | 10/26/2024 |
2.0.174 | 93 | 10/25/2024 |
2.0.133 | 92 | 10/25/2024 |
2.0.132 | 103 | 10/24/2024 |
2.0.131 | 94 | 10/24/2024 |
2.0.130 | 91 | 10/24/2024 |
2.0.129 | 96 | 10/24/2024 |
2.0.128 | 95 | 10/24/2024 |
2.0.127 | 87 | 10/23/2024 |
2.0.126 | 99 | 10/11/2024 |
2.0.125 | 96 | 10/11/2024 |
2.0.124 | 97 | 10/11/2024 |
2.0.123 | 100 | 10/11/2024 |
2.0.122 | 106 | 10/11/2024 |
2.0.121 | 101 | 10/11/2024 |
2.0.120 | 103 | 10/11/2024 |
2.0.119 | 103 | 10/11/2024 |
2.0.118 | 113 | 10/11/2024 |
2.0.117 | 101 | 10/10/2024 |
2.0.115 | 99 | 10/10/2024 |
2.0.113 | 103 | 10/6/2024 |
2.0.112 | 156 | 8/22/2024 |
2.0.111 | 148 | 5/14/2024 |
2.0.110 | 113 | 5/13/2024 |
2.0.109 | 100 | 5/13/2024 |
2.0.108 | 147 | 5/6/2024 |
2.0.107 | 141 | 5/6/2024 |
2.0.106 | 174 | 5/6/2024 |
1.2.105 | 114 | 5/4/2024 |
1.2.102 | 118 | 5/4/2024 |
1.2.101 | 127 | 4/26/2024 |
1.2.100 | 126 | 4/22/2024 |
1.2.99 | 118 | 4/21/2024 |
1.2.98 | 96 | 4/21/2024 |
1.1.97 | 111 | 4/19/2024 |
1.1.96 | 106 | 4/18/2024 |
1.1.95 | 104 | 4/18/2024 |
1.1.94 | 143 | 2/13/2024 |
1.1.93 | 133 | 2/10/2024 |
1.1.91 | 109 | 2/10/2024 |
1.1.90 | 94 | 2/10/2024 |
1.1.89 | 257 | 2/3/2024 |
1.1.86 | 118 | 2/1/2024 |
1.1.85 | 119 | 1/30/2024 |
1.1.83 | 159 | 1/27/2024 |
1.1.82 | 198 | 1/5/2024 |
1.1.81 | 251 | 1/3/2024 |
1.1.80 | 122 | 12/30/2023 |
1.1.79 | 120 | 12/30/2023 |
1.1.78 | 147 | 12/30/2023 |
1.1.77 | 140 | 12/28/2023 |
1.1.76 | 136 | 12/27/2023 |
1.1.75 | 178 | 12/9/2023 |
1.1.73 | 185 | 11/30/2023 |
1.1.72 | 166 | 11/27/2023 |
1.1.71 | 168 | 11/27/2023 |
1.1.70 | 145 | 11/27/2023 |
1.1.69 | 132 | 11/27/2023 |
1.0.67 | 159 | 11/25/2023 |
1.0.66 | 139 | 11/25/2023 |
1.0.65 | 166 | 11/23/2023 |
1.0.64 | 153 | 11/23/2023 |
1.0.62 | 146 | 11/18/2023 |
1.0.61 | 147 | 11/18/2023 |
1.0.60 | 128 | 11/17/2023 |
1.0.59 | 137 | 11/16/2023 |
1.0.58 | 128 | 11/13/2023 |
1.0.57 | 125 | 11/12/2023 |
1.0.56 | 147 | 11/12/2023 |
1.0.54 | 202 | 11/7/2023 |
Added CancellationCheckInterval config