Just wanted to let you all know that i’ve today published the code for a new Storage Provider that i’ve been working on for a while.
The Provider is built for a system called Composite C1 (http://www.composite.net/) which is a CMS with its abstraction over any linq-compatible datastorage. Out of the box it supports simple Xml files or native MS SQL.
I’ve built this provider to be able to ship and use Hangfire on all Composite C1 solutions without having to worry about whether the installation uses xml files or sql as underlying storage.
Hi
I’m trying to use the ScheduledTasks from the CompositeC1Contrib.ScheduledTasks project and is having some problems with the configuration of ScheduledTasks. I managed to the ScheduledTasks installed on my test C1 site but I’m getting the following error when tryin access the ScheduledTasks module from the C1 console: “JobStorage.Current property value has not been initialized. You must set it before using Hangfire Client or Server API.” It looks like the ScheduledTasks module is using the Hangfire storage and hangfire features. Is there any where I can find some documentation on configuring and using Hangfire on Composite?
The CompositeC1Contrib.ScheduledTasks uses the Owin-style initialization/configuration, which means you need to call UseCompositeC1ContribScheduledTasks() on your IAppBuilder instance, before being able to use the component.
Internally it will configure HangFire in a default configuration, but you’re free to manually configure HangFire as well.
I have found many ref. to the Contrib project on http://compositec1contrib.codeplex.com/ but it seems that the project is no longer availible there. I was hoping to find some more info on the ScheduledTasks and Owin configuration.
I have found some example on using the Qwin configuration, plugging into the ApplicationStartup path from Composite. I tried to add a Configuration methode to see if there where any Owin AppBuilder availible there but the code was not called. So I’m having a hard time figuring out how to get Composite triggering the Owin configuration in the ScheduledTasks modul. Do You know of any ressources where I can learn more about the Composite C1 Contrib code and examples. I’m trying to learn more for an upcomming project, using Composite.
I guess I expected Composite C1 to have the Owin Host included. I think I need to work a bit more on my Composite C1 skills and knowlegde, to learn how to include my own application to C1.
I can successfully configure Hangfire and enqueue a job, however the task won’t fire. I verify the job is created, there are xml records in datastore.
What would be the problem here? Why jobs won’t fire?
MyAppStartup.cs
using Composite.Core.Application;
using Hangfire.CompositeC1;
[ApplicationStartup]
public class MyAppStartupHandler
{
public static void OnInitialized()
{
Hangfire.GlobalConfiguration.Configuration.UseCompositeC1Storage();
}
}
MyCronJob.cs
using CompositeC1Contrib.ScheduledTasks.Configuration;
using Hangfire;
public static class CronJobs
{
public static void Test()
{
Hangfire.BackgroundJob.Enqueue(() => MyTestApp.Utils.Debug.Break() );
}
}
Hi,
I am trying to use compositeC1 package.But it is not working on my machine.
Application throws an error while executing
a method “Hangfire.GlobalConfiguration.Configuration.UseCompositeC1Storage()”. in startup class.
The error is,
The type initializer for ‘Composite.Core.ResourceSystem.StringResourceSystemFacade’ threw an exception.