Make TaskExecutingServer opt-in
This commit is contained in:
parent
51220b40c9
commit
0f10808477
|
|
@ -1,6 +1,7 @@
|
|||
using Elsa.Activities.Http.Extensions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Persistence.Memory;
|
||||
using Elsa.Runtime;
|
||||
using Elsa.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
|
@ -22,6 +23,7 @@ namespace Sample06
|
|||
{
|
||||
services
|
||||
.AddWorkflows()
|
||||
.AddTaskExecutingServer()
|
||||
.AddHttpActivities();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using Elsa.Activities.Http.Extensions;
|
|||
using Elsa.Activities.Timers.Extensions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Persistence.Memory;
|
||||
using Elsa.Runtime;
|
||||
using Elsa.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
|
@ -24,6 +25,7 @@ namespace Sample07
|
|||
{
|
||||
services
|
||||
.AddWorkflows()
|
||||
.AddTaskExecutingServer()
|
||||
.AddHttpActivities(options => options.Bind(Configuration.GetSection("Http")))
|
||||
.AddEmailActivities(options => options.Bind(Configuration.GetSection("Smtp")))
|
||||
.AddTimerActivities(options => options.Bind(Configuration.GetSection("BackgroundRunner")))
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using Elsa.Activities.MassTransit.Extensions;
|
|||
using Elsa.Activities.Timers.Extensions;
|
||||
using Elsa.Extensions;
|
||||
using Elsa.Persistence.Memory;
|
||||
using Elsa.Runtime;
|
||||
using Elsa.Services;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
|
|
@ -29,6 +30,7 @@ namespace Sample08
|
|||
{
|
||||
services
|
||||
.AddWorkflows()
|
||||
.AddTaskExecutingServer()
|
||||
.AddHttpActivities()
|
||||
.AddTimerActivities(options => options.Configure(x => x.SweepInterval = Period.FromSeconds(10)))
|
||||
.AddEmailActivities(options => options.Bind(Configuration.GetSection("Smtp")))
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@ namespace Elsa.Activities.Http.Extensions
|
|||
.AddActivity<HttpRequestAction>();
|
||||
|
||||
services
|
||||
.AddTaskExecutingServer()
|
||||
.AddSingleton<ITokenService, TokenService>()
|
||||
.AddSingleton<IContentFormatter, DefaultContentFormatter>()
|
||||
.AddSingleton<IContentFormatter, JsonContentFormatter>()
|
||||
|
|
|
|||
|
|
@ -19,6 +19,9 @@ namespace Elsa.Runtime
|
|||
.AddTransient<IStartupTask, TStartupTask>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers a TaskExecutingServer that automatically invokes <see cref="IStartupRunner"/> when Kestrel starts.
|
||||
/// </summary>
|
||||
public static IServiceCollection AddTaskExecutingServer(this IServiceCollection services)
|
||||
{
|
||||
return services
|
||||
|
|
|
|||
Loading…
Reference in a new issue