Itmo.Dev.Platform.BackgroundTasks
1.0.56
Prefix Reserved
See the version list below for details.
dotnet add package Itmo.Dev.Platform.BackgroundTasks --version 1.0.56
NuGet\Install-Package Itmo.Dev.Platform.BackgroundTasks -Version 1.0.56
<PackageReference Include="Itmo.Dev.Platform.BackgroundTasks" Version="1.0.56" />
paket add Itmo.Dev.Platform.BackgroundTasks --version 1.0.56
#r "nuget: Itmo.Dev.Platform.BackgroundTasks, 1.0.56"
// Install Itmo.Dev.Platform.BackgroundTasks as a Cake Addin #addin nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.0.56 // Install Itmo.Dev.Platform.BackgroundTasks as a Cake Tool #tool nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.0.56
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,
"SchedulerRetryCount": int,
"SchedulerRetryDelays": [int]
}
- BatchSize
Number of tasks fetched per enqueuing run - PollingDelay
Delay between enqueuing runs - 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.0.56)
- Itmo.Dev.Platform.Postgres (>= 1.0.56)
- 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.204 | 117 | 10/29/2024 |
2.2.202 | 82 | 10/29/2024 |
2.1.196 | 88 | 10/29/2024 |
2.1.193 | 64 | 10/29/2024 |
2.1.190 | 66 | 10/26/2024 |
2.0.174 | 88 | 10/25/2024 |
2.0.133 | 87 | 10/25/2024 |
2.0.132 | 97 | 10/24/2024 |
2.0.131 | 89 | 10/24/2024 |
2.0.130 | 86 | 10/24/2024 |
2.0.129 | 91 | 10/24/2024 |
2.0.128 | 90 | 10/24/2024 |
2.0.127 | 83 | 10/23/2024 |
2.0.126 | 94 | 10/11/2024 |
2.0.125 | 91 | 10/11/2024 |
2.0.124 | 91 | 10/11/2024 |
2.0.123 | 94 | 10/11/2024 |
2.0.122 | 100 | 10/11/2024 |
2.0.121 | 95 | 10/11/2024 |
2.0.120 | 97 | 10/11/2024 |
2.0.119 | 98 | 10/11/2024 |
2.0.118 | 108 | 10/11/2024 |
2.0.117 | 96 | 10/10/2024 |
2.0.115 | 94 | 10/10/2024 |
2.0.113 | 98 | 10/6/2024 |
2.0.112 | 153 | 8/22/2024 |
2.0.111 | 145 | 5/14/2024 |
2.0.110 | 110 | 5/13/2024 |
2.0.109 | 97 | 5/13/2024 |
2.0.108 | 144 | 5/6/2024 |
2.0.107 | 138 | 5/6/2024 |
2.0.106 | 171 | 5/6/2024 |
1.2.105 | 111 | 5/4/2024 |
1.2.102 | 115 | 5/4/2024 |
1.2.101 | 124 | 4/26/2024 |
1.2.100 | 123 | 4/22/2024 |
1.2.99 | 115 | 4/21/2024 |
1.2.98 | 93 | 4/21/2024 |
1.1.97 | 108 | 4/19/2024 |
1.1.96 | 103 | 4/18/2024 |
1.1.95 | 101 | 4/18/2024 |
1.1.94 | 140 | 2/13/2024 |
1.1.93 | 128 | 2/10/2024 |
1.1.91 | 106 | 2/10/2024 |
1.1.90 | 91 | 2/10/2024 |
1.1.89 | 254 | 2/3/2024 |
1.1.86 | 115 | 2/1/2024 |
1.1.85 | 116 | 1/30/2024 |
1.1.83 | 154 | 1/27/2024 |
1.1.82 | 195 | 1/5/2024 |
1.1.81 | 248 | 1/3/2024 |
1.1.80 | 119 | 12/30/2023 |
1.1.79 | 117 | 12/30/2023 |
1.1.78 | 144 | 12/30/2023 |
1.1.77 | 137 | 12/28/2023 |
1.1.76 | 133 | 12/27/2023 |
1.1.75 | 175 | 12/9/2023 |
1.1.73 | 182 | 11/30/2023 |
1.1.72 | 163 | 11/27/2023 |
1.1.71 | 165 | 11/27/2023 |
1.1.70 | 140 | 11/27/2023 |
1.1.69 | 129 | 11/27/2023 |
1.0.67 | 154 | 11/25/2023 |
1.0.66 | 136 | 11/25/2023 |
1.0.65 | 163 | 11/23/2023 |
1.0.64 | 150 | 11/23/2023 |
1.0.62 | 143 | 11/18/2023 |
1.0.61 | 144 | 11/18/2023 |
1.0.60 | 125 | 11/17/2023 |
1.0.59 | 134 | 11/16/2023 |
1.0.58 | 125 | 11/13/2023 |
1.0.57 | 122 | 11/12/2023 |
1.0.56 | 144 | 11/12/2023 |
1.0.54 | 199 | 11/7/2023 |
Added BackgroundTasks