Itmo.Dev.Platform.BackgroundTasks 1.0.57

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Itmo.Dev.Platform.BackgroundTasks --version 1.0.57
NuGet\Install-Package Itmo.Dev.Platform.BackgroundTasks -Version 1.0.57
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Itmo.Dev.Platform.BackgroundTasks" Version="1.0.57" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Itmo.Dev.Platform.BackgroundTasks --version 1.0.57
#r "nuget: Itmo.Dev.Platform.BackgroundTasks, 1.0.57"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Itmo.Dev.Platform.BackgroundTasks as a Cake Addin
#addin nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.0.57

// Install Itmo.Dev.Platform.BackgroundTasks as a Cake Tool
#tool nuget:?package=Itmo.Dev.Platform.BackgroundTasks&version=1.0.57

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Itmo.Dev.Platform.BackgroundTasks:

Package Downloads
Itmo.Dev.Platform.BackgroundTasks.Hangfire The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

Itmo.Dev.Platform.BackgroundTasks.Postgres The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.111 107 5/14/2024
2.0.110 75 5/13/2024
2.0.109 67 5/13/2024
2.0.108 103 5/6/2024
2.0.107 99 5/6/2024
2.0.106 110 5/6/2024
1.2.105 89 5/4/2024
1.2.102 92 5/4/2024
1.2.101 84 4/26/2024
1.2.100 86 4/22/2024
1.2.99 83 4/21/2024
1.2.98 83 4/21/2024
1.1.97 83 4/19/2024
1.1.96 77 4/18/2024
1.1.95 92 4/18/2024
1.1.94 103 2/13/2024
1.1.93 87 2/10/2024
1.1.91 68 2/10/2024
1.1.90 68 2/10/2024
1.1.89 157 2/3/2024
1.1.86 91 2/1/2024
1.1.85 80 1/30/2024
1.1.83 136 1/27/2024
1.1.82 172 1/5/2024
1.1.81 210 1/3/2024
1.1.80 98 12/30/2023
1.1.79 83 12/30/2023
1.1.78 102 12/30/2023
1.1.77 114 12/28/2023
1.1.76 107 12/27/2023
1.1.75 155 12/9/2023
1.1.73 145 11/30/2023
1.1.72 138 11/27/2023
1.1.71 126 11/27/2023
1.1.70 109 11/27/2023
1.1.69 110 11/27/2023
1.0.67 132 11/25/2023
1.0.66 119 11/25/2023
1.0.65 125 11/23/2023
1.0.64 111 11/23/2023
1.0.62 122 11/18/2023
1.0.61 122 11/18/2023
1.0.60 101 11/17/2023
1.0.59 113 11/16/2023
1.0.58 118 11/13/2023
1.0.57 99 11/12/2023
1.0.56 116 11/12/2023
1.0.54 105 11/7/2023

Added BackgroundTasks