From a another class i'm call my method RitzauController.SyncRitzau();
But when I'm doing that, then _context are null.
I'm trying to get hangfire to run my method.
But if I call my UmbracoApiController method by url then it works.
Any suggentions how to get around that ?
My hangfire method
public void BaselineSync()
{
RecurringJob.AddOrUpdate("RitzauSync", () => Ritzau(), Cron.Daily(01, 00));
}
public void Ritzau()
{
RitzauController.SyncRitzau();
}
_context.EnsureUmbracoContext() - calling a Controller method from a another class
Hey,
I'm using this to get a specific node by it's Doctype alias..
From a another class i'm call my method
RitzauController.SyncRitzau();
But when I'm doing that, then _context are null. I'm trying to get hangfire to run my method.But if I call my UmbracoApiController method by url then it works.
Any suggentions how to get around that ?
My hangfire method
is working on a reply...