Using Umbraco Commerce from a Background Job #545
Replies: 3 comments
-
Yea, unfortunately we can only work out if it's a local env if we have access to the domain, but I guess we could implement a background license that assumes if there is no HTTP Context that it should be fully licensed 🤔 I'll need to check this logic with some other folks though just to make sure we aren't exposing more than we should be. |
Beta Was this translation helpful? Give feedback.
-
Thanks @mattbrailsford. We have a work-around for now so not urgent or anything. |
Beta Was this translation helpful? Give feedback.
-
Closing as a background task license resolve has been implemented |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Matt,
We've need to pull in some external data that is processed by a background job using Hangfire into an order property, but when we try and save the order it throws an invalid licence exception on localhost (which I believe should not have any licence restrictions). From what I think is happening is that Umbraco Commerce is looking at the HTTP context to determine the domain which of course will be null in a Hangfire job.
I can mock a HTTP context to get around this and get it working but wondered if there was a better way to handle the licencing from a background job?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions