Itmo.Dev.Platform.BackgroundTasks 1.0.61

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.61                
NuGet\Install-Package Itmo.Dev.Platform.BackgroundTasks -Version 1.0.61                
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.61" />                
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.61                
#r "nuget: Itmo.Dev.Platform.BackgroundTasks, 1.0.61"                
#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.61

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

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

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.0.112 118 8/22/2024
2.0.111 111 5/14/2024
2.0.110 77 5/13/2024
2.0.109 70 5/13/2024
2.0.108 108 5/6/2024
2.0.107 101 5/6/2024
2.0.106 114 5/6/2024
1.2.105 94 5/4/2024
1.2.102 97 5/4/2024
1.2.101 106 4/26/2024
1.2.100 93 4/22/2024
1.2.99 89 4/21/2024
1.2.98 89 4/21/2024
1.1.97 90 4/19/2024
1.1.96 84 4/18/2024
1.1.95 99 4/18/2024
1.1.94 108 2/13/2024
1.1.93 90 2/10/2024
1.1.91 71 2/10/2024
1.1.90 73 2/10/2024
1.1.89 186 2/3/2024
1.1.86 96 2/1/2024
1.1.85 84 1/30/2024
1.1.83 139 1/27/2024
1.1.82 175 1/5/2024
1.1.81 213 1/3/2024
1.1.80 104 12/30/2023
1.1.79 88 12/30/2023
1.1.78 106 12/30/2023
1.1.77 118 12/28/2023
1.1.76 111 12/27/2023
1.1.75 160 12/9/2023
1.1.73 150 11/30/2023
1.1.72 142 11/27/2023
1.1.71 130 11/27/2023
1.1.70 113 11/27/2023
1.1.69 112 11/27/2023
1.0.67 136 11/25/2023
1.0.66 124 11/25/2023
1.0.65 129 11/23/2023
1.0.64 115 11/23/2023
1.0.62 126 11/18/2023
1.0.61 127 11/18/2023
1.0.60 105 11/17/2023
1.0.59 117 11/16/2023
1.0.58 123 11/13/2023
1.0.57 106 11/12/2023
1.0.56 123 11/12/2023
1.0.54 113 11/7/2023

Added multiple metadata search