do not create a new Scope - reuse workflowExecutionContext's scope (#2502)
* do not create a new Scope - reuse workflowExecutionContext's scope * Upgrade Rebus.ServiceProvider to 7.0 Co-authored-by: Martin <mp@prakom.net>
This commit is contained in:
parent
76bb8a9eb6
commit
4cf53d7ff1
|
|
@ -42,7 +42,7 @@
|
|||
<PackageReference Include="Storage.Net" Version="9.3.0" />
|
||||
<PackageReference Include="System.Linq.Async" Version="5.0.0" />
|
||||
<PackageReference Include="System.Threading.Channels" Version="5.0.0" />
|
||||
<PackageReference Include="Rebus.ServiceProvider" Version="6.4.1" />
|
||||
<PackageReference Include="Rebus.ServiceProvider" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -204,10 +204,8 @@ namespace Elsa.Services.Workflows
|
|||
|
||||
private async ValueTask<bool> CanExecuteAsync(WorkflowExecutionContext workflowExecutionContext, IActivityBlueprint activityBlueprint, bool resuming, CancellationToken cancellationToken)
|
||||
{
|
||||
using var scope = _serviceScopeFactory.CreateScope();
|
||||
|
||||
var activityExecutionContext = new ActivityExecutionContext(
|
||||
scope.ServiceProvider,
|
||||
workflowExecutionContext.ServiceProvider,
|
||||
workflowExecutionContext,
|
||||
activityBlueprint,
|
||||
workflowExecutionContext.Input,
|
||||
|
|
|
|||
Loading…
Reference in a new issue