All Projects → ahydrax → Hangfire.Atoms

ahydrax / Hangfire.Atoms

Licence: MIT license
Execute multiple jobs as a one atomic job.

Programming Languages

C#
18002 projects
HTML
75241 projects

Projects that are alternatives of or similar to Hangfire.Atoms

Hangfire.MissionControl
A plugin for Hangfire that enables you to launch jobs manually.
Stars: ✭ 51 (+155%)
Mutual labels:  hangfire
klyva
A state management library that follows the React component model
Stars: ✭ 53 (+165%)
Mutual labels:  atoms
Hangfire.MemoryStorage
A memory storage for Hangfire.
Stars: ✭ 113 (+465%)
Mutual labels:  hangfire
SdvCodeWebsite
Simeon Valev - Personal Blog - Developed on ASP.NET Core MVC - Server-Side Blazor - See README.md file for more information
Stars: ✭ 38 (+90%)
Mutual labels:  hangfire
pdbtbx
A library to open/edit/save (crystallographic) Protein Data Bank (PDB) and mmCIF files in Rust.
Stars: ✭ 13 (-35%)
Mutual labels:  atoms
blase
Python module for drawing and rendering ASE (Atomic Simulation Environment) atoms and molecules objects using blender.
Stars: ✭ 12 (-40%)
Mutual labels:  atoms
react-native-template
An enterprise react-native template application showcasing - Testing strategy, Global state management, middleware support, a network layer, component library integration, localization, navigation configuration and CI
Stars: ✭ 32 (+60%)
Mutual labels:  atoms
Hangfire
An easy way to perform background job processing in your .NET and .NET Core applications. No Windows Service or separate process required
Stars: ✭ 7,126 (+35530%)
Mutual labels:  hangfire
Hangfire.JobsLogger
A Hangfire extension to store a log during job execution.
Stars: ✭ 21 (+5%)
Mutual labels:  hangfire
forge-checkmodels-createissues-revit
Design Check with Design Automation for Revit: Perform a basic design check on models uploaded to BIM 360 and log conflicts as Issues
Stars: ✭ 19 (-5%)
Mutual labels:  hangfire
Hangfire.Dashboard.BasicAuthorization
Hangfire.Dashboard.BasicAuthorization for .netcore
Stars: ✭ 34 (+70%)
Mutual labels:  hangfire
hangfire-dashboard-customize
Customize your Hangfire Dashboard (e.g. Change the Title of the Dashboard)
Stars: ✭ 19 (-5%)
Mutual labels:  hangfire
Hangfire.StructureMap
Hangfire background job activator based on the StructureMap IoC container
Stars: ✭ 16 (-20%)
Mutual labels:  hangfire
Hangfire.Heartbeat
Server monitoring plugin for Hangfire.
Stars: ✭ 71 (+255%)
Mutual labels:  hangfire
Hangfire.AzureDocumentDB
Azure DocumentDB storage provider for Hangfire
Stars: ✭ 14 (-30%)
Mutual labels:  hangfire

Hangfire.Atoms

NuGet

Execute multiple jobs as a single atomic job.

READ THIS BEFORE UPGRADE

If you're coming from version <=0.3 you have to wait till your atomic jobs (in enqueued, scheduled, awaiting, etc. states) finishes as in version 0.4 data schema has been changed dramatically and this can lead to job state corruption.

This affects only existing users. New users have not to worry about anything.

Requirements

  • The storage you chosen must implement JobStorageConnection & JobStorageTransaction
  • NET Standard 2.0 compatible project

Setup

Install a package from Nuget. Then configure your server and dashboard like this:

services.AddHangfire(configuration =>
    {
        configuration.UseStorage(yourStorage);
        configuration.UseAtoms();
    });

Or this:

GlobalConfiguration.UseStorage(yourStorage);
GlobalConfiguration.UseAtoms();

You must setup Hangfire storage before calling UseAtoms();.

Usage

Additional extension methods are added for IBackgroundJobClient.

Atoms

var client = new BackgroundJobClient();

// Enqueue
var atomId = client.Enqueue("atom-1", builder =>
    {
        for (var i = 0; i < 50; i++)
        {
            builder.Enqueue(() => DoWork());
        }
    });

// Continuations
var job1 = client.Enqueue(() => DoPrepare());
var atomId = client.ContinueWith(job1, "atom-2", builder =>
    {
        for (var i = 0; i < 50; i++)
        {
            builder.Enqueue(() => DoWork());
        }
    });

// Scheduling
var atomId = client.Schedule("atom-3", TimeSpan.FromSeconds(3), builder =>
    {
        for (var i = 0; i < 50; i++)
        {
            builder.Enqueue(() => DoWork());
        }
    });

// Atoms can be used as a common job which means you can continue them
client.ContinueWith(atomId, () => Done());

Triggers

Triggers are event-like primitives. You can subscribe to it and set it manually whenever you need it.

// Triggers
var triggerJobId = client.OnTriggerSet("trigger-1");
client.ContinueWith(triggerJobId, () => DoWork());

// Set trigger manually when you need it
client.Schedule(() => SetTrigger("trigger-1"), TimeSpan.FromSeconds(10));

License

Authored by: Viktor Svyatokha (ahydrax)

This project is under MIT license. You can obtain the license copy here.

This work is based on the work of Sergey Odinokov, author of Hangfire. http://hangfire.io/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].