< Summary - Syki

Information
Class: Syki.Back.Configs.QuartzConfigs
Assembly: Back
File(s): /home/runner/work/syki/syki/Back/Configs/QuartzConfigs.cs
Tag: 56_26538939494
Line coverage
100%
Covered lines: 13
Uncovered lines: 0
Coverable lines: 13
Total lines: 24
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddQuartzConfigs(...)100%22100%

File(s)

/home/runner/work/syki/syki/Back/Configs/QuartzConfigs.cs

#LineLine coverage
 1using Quartz;
 2
 3namespace Syki.Back.Configs;
 4
 5public static class QuartzConfigs
 6{
 7    public static void AddQuartzConfigs(this WebApplicationBuilder builder)
 8    {
 29        var commands = builder.Configuration.Jobs.CommandsPollingIntervalInSeconds;
 10
 211        builder.Services.AddQuartz(q =>
 212        {
 213            var commandsId = nameof(CommandsProcessor);
 414            q.AddJob<CommandsProcessor>(j => j.WithIdentity(commandsId));
 415            q.AddTrigger(t => t
 416                .ForJob(commandsId)
 417                .WithIdentity($"{commandsId}-trigger")
 418                .WithSimpleSchedule(s => s.WithIntervalInSeconds(commands).RepeatForever())
 219            );
 420        });
 21
 422        builder.Services.AddQuartzHostedService(q => q.WaitForJobsToComplete = true);
 223    }
 24}