Showing 2 of 2 total issues
Method FindServiceParameter
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static Tuple<string, TimeZoneInfo, CronFormat> FindServiceParameter(IServiceCollection services, string serviceName)
{
var serviceProvider = services.BuildServiceProvider();
var configurationObject = serviceProvider.GetRequiredService<IConfiguration>();
string cronExpression = configurationObject.GetValue<string>("CronJobs:" + serviceName + ":CronExpression");
Method ScheduleJob
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected virtual async Task ScheduleJob(CancellationToken cancellationToken)
{
var next = cronExpression.GetNextOccurrence(DateTimeOffset.Now, timeZoneInfo);
if (next.HasValue)
{