From 32b04ded2821b693d3df528755bbf1ea6b98f0a5 Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Tue, 4 Nov 2025 20:34:04 +0100 Subject: [PATCH] Enables distributed runtime for workflows Configures the workflow runtime to use a distributed implementation, enhancing scalability and resilience. Adds debug logging for Elsa. --- src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj | 1 + src/apps/Elsa.Server.Web/Program.cs | 2 ++ src/apps/Elsa.Server.Web/appsettings.json | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj b/src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj index c0537447d..6fa3939e8 100644 --- a/src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj +++ b/src/apps/Elsa.Server.Web/Elsa.Server.Web.csproj @@ -7,6 +7,7 @@ + diff --git a/src/apps/Elsa.Server.Web/Program.cs b/src/apps/Elsa.Server.Web/Program.cs index 69e723bbb..71ef18012 100644 --- a/src/apps/Elsa.Server.Web/Program.cs +++ b/src/apps/Elsa.Server.Web/Program.cs @@ -17,6 +17,7 @@ using Elsa.Workflows.CommitStates.Strategies; using Elsa.Workflows.IncidentStrategies; using Elsa.Workflows.LogPersistence; using Elsa.Workflows.Options; +using Elsa.Workflows.Runtime.Distributed.Extensions; using Elsa.Workflows.Runtime.Options; using Elsa.Workflows.Runtime.Tasks; using JetBrains.Annotations; @@ -70,6 +71,7 @@ services { runtime.UseEntityFrameworkCore(ef => ef.UseSqlite()); runtime.UseCache(); + runtime.UseDistributedRuntime(); }) .UseWorkflowsApi() .UseScheduling() diff --git a/src/apps/Elsa.Server.Web/appsettings.json b/src/apps/Elsa.Server.Web/appsettings.json index b0bd725e6..f7456f2df 100644 --- a/src/apps/Elsa.Server.Web/appsettings.json +++ b/src/apps/Elsa.Server.Web/appsettings.json @@ -2,7 +2,8 @@ "Logging": { "LogLevel": { "Default": "Warning", - "Microsoft.Hosting.Lifetime": "Information" + "Microsoft.Hosting.Lifetime": "Information", + "Elsa": "Debug" } }, "HostBuilder": {