All Projects → perrich → Hangfire.MemoryStorage

perrich / Hangfire.MemoryStorage

Licence: Apache-2.0 license
A memory storage for Hangfire.

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to Hangfire.MemoryStorage

SdvCodeWebsite
Simeon Valev - Personal Blog - Developed on ASP.NET Core MVC - Server-Side Blazor - See README.md file for more information
Stars: ✭ 38 (-66.37%)
Mutual labels:  hangfire
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 (+6206.19%)
Mutual labels:  hangfire
Hangfire.JobsLogger
A Hangfire extension to store a log during job execution.
Stars: ✭ 21 (-81.42%)
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 (-83.19%)
Mutual labels:  hangfire
Hangfire.Dashboard.BasicAuthorization
Hangfire.Dashboard.BasicAuthorization for .netcore
Stars: ✭ 34 (-69.91%)
Mutual labels:  hangfire
hangfire-dashboard-customize
Customize your Hangfire Dashboard (e.g. Change the Title of the Dashboard)
Stars: ✭ 19 (-83.19%)
Mutual labels:  hangfire
Hangfire.StructureMap
Hangfire background job activator based on the StructureMap IoC container
Stars: ✭ 16 (-85.84%)
Mutual labels:  hangfire
Hangfire.Heartbeat
Server monitoring plugin for Hangfire.
Stars: ✭ 71 (-37.17%)
Mutual labels:  hangfire
Hangfire.AzureDocumentDB
Azure DocumentDB storage provider for Hangfire
Stars: ✭ 14 (-87.61%)
Mutual labels:  hangfire
Hangfire.Atoms
Execute multiple jobs as a one atomic job.
Stars: ✭ 20 (-82.3%)
Mutual labels:  hangfire
Hangfire.MissionControl
A plugin for Hangfire that enables you to launch jobs manually.
Stars: ✭ 51 (-54.87%)
Mutual labels:  hangfire
incache
Powerful key/value in-memory storage or on disk to persist data
Stars: ✭ 16 (-85.84%)
Mutual labels:  memory-storage

Hangfire.MemoryStorage

A memory storage for Hangfire (http://hangfire.io).

It can be useful for testing purpose like check the behaviour and use it in a development environment. Please note that :

  • it should not be used in production (no integrity and no thread safe even if many cases are managed).
  • data are stored in memory using a dictionary in a static way (See Data created at the storage creation)
  • Hangfire has its own solution (see https://github.com/HangfireIO/Hangfire.InMemory)

How To use MemoryStorage

GlobalConfiguration.Configuration.UseMemoryStorage();

Example: Set a job now and execute.

Startup Class

public void ConfigureServices(IServiceCollection services)
{   // Add This
    services.AddHangfire(config =>
    {
        config.UseMemoryStorage();
    });
}

 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{   
    // Add This
    app.UseHangfireDashboard();
    app.UseHangfireServer();
}
static void Main(string[] args)
{
        
   BackgroundJob.Enqueue(() => System.IO.File.WriteAllText(@"..\test.txt","1"));
}

OutPut:

test.txt
1

License:

Copyright 2015 - 2022 PERRICHOT Florian

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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].