Itmo.Dev.Platform.BackgroundTasks 1.0.67

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

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

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 84 5/14/2024
2.0.110 67 5/13/2024
2.0.109 57 5/13/2024
2.0.108 96 5/6/2024
2.0.107 92 5/6/2024
2.0.106 99 5/6/2024
1.2.105 82 5/4/2024
1.2.102 86 5/4/2024
1.2.101 77 4/26/2024
1.2.100 83 4/22/2024
1.2.99 79 4/21/2024
1.2.98 80 4/21/2024
1.1.97 81 4/19/2024
1.1.96 74 4/18/2024
1.1.95 90 4/18/2024
1.1.94 97 2/13/2024
1.1.93 82 2/10/2024
1.1.91 62 2/10/2024
1.1.90 63 2/10/2024
1.1.89 146 2/3/2024
1.1.86 87 2/1/2024
1.1.85 74 1/30/2024
1.1.83 130 1/27/2024
1.1.82 167 1/5/2024
1.1.81 205 1/3/2024
1.1.80 95 12/30/2023
1.1.79 80 12/30/2023
1.1.78 100 12/30/2023
1.1.77 110 12/28/2023
1.1.76 105 12/27/2023
1.1.75 152 12/9/2023
1.1.73 143 11/30/2023
1.1.72 135 11/27/2023
1.1.71 123 11/27/2023
1.1.70 107 11/27/2023
1.1.69 106 11/27/2023
1.0.67 129 11/25/2023
1.0.66 117 11/25/2023
1.0.65 122 11/23/2023
1.0.64 109 11/23/2023
1.0.62 118 11/18/2023
1.0.61 120 11/18/2023
1.0.60 98 11/17/2023
1.0.59 110 11/16/2023
1.0.58 116 11/13/2023
1.0.57 97 11/12/2023
1.0.56 114 11/12/2023
1.0.54 101 11/7/2023

Added multiple metadata search