Fix Timers sample
This commit is contained in:
parent
ca97f90120
commit
bb1329147f
|
|
@ -10,6 +10,13 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
|
||||
namespace Elsa.Samples.Serialization
|
||||
{
|
||||
/// <summary>
|
||||
/// Demonstrates how to:
|
||||
/// 1. Serialize a workflow definition model to JSON.
|
||||
/// 2. Deserialize JSON back to a workflow definition model.
|
||||
/// 3. Materialize a workflow definition model into a workflow blueprint.
|
||||
/// 4. Run a workflow blueprint.
|
||||
/// </summary>
|
||||
class Program
|
||||
{
|
||||
static async Task Main(string[] args)
|
||||
|
|
|
|||
|
|
@ -13,18 +13,13 @@ namespace Elsa.Samples.Timers
|
|||
|
||||
public static IHostBuilder CreateHostBuilder() =>
|
||||
Host.CreateDefaultBuilder()
|
||||
.ConfigureLogging(logging => logging.AddConsole().SetMinimumLevel(LogLevel.Debug))
|
||||
.ConfigureServices(
|
||||
(hostContext, services) =>
|
||||
{
|
||||
services
|
||||
.AddElsa(
|
||||
options =>
|
||||
options.UsePersistence(
|
||||
config => config.UseSqLite("Data Source=elsa.db;Cache=Shared")))
|
||||
.AddTimerActivities(
|
||||
options =>
|
||||
options.Configure(timer => timer.SweepInterval = Duration.FromSeconds(5)))
|
||||
.AddElsa(options => options.UsePersistence(db => db.UseSqLite("Data Source=elsa.db;Cache=Shared")))
|
||||
.AddConsoleActivities()
|
||||
.AddTimerActivities(options => options.Configure(timer => timer.SweepInterval = Duration.FromSeconds(5)))
|
||||
.AddWorkflow<RecurringTaskWorkflow>();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue