mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Fixed bad assumption about HttpContext
HttpContext is not available when running at console
This commit is contained in:
@@ -153,7 +153,9 @@ namespace Orchard.ImportExport.Providers.ImportActions {
|
||||
PrepareRecipe(recipeDocument);
|
||||
|
||||
// Sets the request timeout to a configurable amount of seconds to give enough time to execute custom recipes.
|
||||
if (_orchardServices.WorkContext.HttpContext != null) {
|
||||
_orchardServices.WorkContext.HttpContext.Server.ScriptTimeout = RecipeExecutionTimeout;
|
||||
}
|
||||
|
||||
// Suspend background task execution.
|
||||
_sweepGenerator.Terminate();
|
||||
|
Reference in New Issue
Block a user