Release v1.0.0 #16
.editorconfig.env
.github/workflows
.gitignoreApiDto
ApiDto.csproj
Backend.slnDockerfileCommon
AuthRoles.csCacheType.csCronUpdateSkip.csDatabaseType.csOAuthAction.csOAuthProvider.csPairPeriodTime.csPasswordPolicy.csTwoFactorAuthentication.cs
Requests
Responses
AvailableOAuthProvidersResponse.csCampusBasicInfoResponse.csCampusDetailsResponse.cs
Configuration
DisciplineResponse.csFacultyResponse.csGroupDetailsResponse.csGroupResponse.csLectureHallDetailsResponse.csLectureHallResponse.csLessonTypeResponse.csProfessorResponse.csScheduleResponse.csTotpKeyResponse.csUserResponse.csEndpoint
Backend.httpISaveSettings.cs
README.mdCommon
Attributes
BadRequestResponseAttribute.csCacheMaxAgeAttribute.csLocalhostAttribute.csMaintenanceModeIgnoreAttribute.csNotFoundResponseAttribute.csSwaggerDefaultAttribute.csTokenAuthenticationAttribute.cs
Exceptions
Interfaces
MapperDto
AvailableProvidersConverter.csCronUpdateSkipConverter.csPairPeriodTimeConverter.csPasswordPolicyConverter.csTwoFactorAuthenticationConverter.csUserConverter.cs
Services
Configuration
Core
BackgroundTasks
Middleware
CacheMaxAgeMiddleware.csCookieAuthorizationMiddleware.csCustomExceptionHandlerMiddleware.csJwtRevocationMiddleware.csMaintenanceModeMiddleware.cs
Startup
Model
SwaggerOptions
ActionResultSchemaFilter.csConfigureSwaggerOptions.csDefaultValues.csEnumSchemaFilter.csExampleFilter.csTagSchemeFilter.cs
Validation
Controllers
BaseController.csConfigurationBaseController.cs
Endpoint.csprojProgram.csSetupConfiguration
V1
AuthController.csCampusController.cs
WeatherForecastController.csConfiguration
DisciplineController.csFacultyController.csGroupController.csImportController.csLectureHallController.csLessonTypeController.csProfessorController.csScheduleController.csSecurityController.csSync
WeatherForecast.cswwwroot/css/swagger
Security
Common
CookieNames.cs
DependencyInjection.csDomain
Interfaces
Model
OAuth2
ViewModel
Properties
Security.csprojServices
SqlData
Application
Application.csprojDependencyInjection.cs
Common
Cqrs
Campus/Queries
GetCampusBasicInfoList
CampusBasicInfoDto.csCampusBasicInfoVm.csGetCampusBasicInfoListQuery.csGetCampusBasicInfoListQueryHandler.cs
GetCampusDetails
Discipline/Queries
GetDisciplineDetails
GetDisciplineList
Faculty/Queries/GetFacultyList
Group/Queries
GetGroupDetails
GetGroupList
LectureHall/Queries
GetLectureHallDetails
GetLectureHallList
Professor/Queries
GetProfessorDetails
GetProfessorDetailsBySearch
GetProfessorList
Schedule/Queries/GetScheduleList
TypeOfOccupation/Queries/GetTypeOfOccupationList
Interfaces/DbContexts
Domain
Domain.csproj
Schedule
Migrations
MysqlMigrations
Migrations
20240601023106_InitialMigration.Designer.cs20240601023106_InitialMigration.cs20241027034820_RemoveUnusedRef.Designer.cs20241027034820_RemoveUnusedRef.csUberDbContextModelSnapshot.cs
MysqlMigrations.csprojPsqlMigrations
Migrations
20240601021702_InitialMigration.Designer.cs20240601021702_InitialMigration.cs20241027032753_RemoveUnusedRef.Designer.cs20241027032753_RemoveUnusedRef.csUberDbContextModelSnapshot.cs
PsqlMigrations.csprojSqliteMigrations
Persistence
Common
BaseDbContext.csConfigurationResolver.csDatabaseProvider.csDbContextFactory.csModelBuilderExtensions.cs
Contexts/Schedule
CampusDbContext.csDisciplineDbContext.csFacultyDbContext.csGroupDbContext.csLectureHallDbContext.csLessonAssociationDbContext.csLessonDbContext.csProfessorDbContext.csSpecificWeekDbContext.csTypeOfOccupationDbContext.cs
DbInitializer.csDependencyInjection.csEntityTypeConfigurations
Mark.cs
Persistence.csprojUberDbContext.csMysql/Schedule
CampusConfiguration.csDisciplineConfiguration.csFacultyConfiguration.csGroupConfiguration.csLectureHallConfiguration.csLessonAssociationConfiguration.csLessonConfiguration.csProfessorConfiguration.csSpecificWeekConfiguration.csTypeOfOccupationConfiguration.cs
Postgresql/Schedule
CampusConfiguration.csDisciplineConfiguration.csFacultyConfiguration.csGroupConfiguration.csLectureHallConfiguration.csLessonAssociationConfiguration.csLessonConfiguration.csProfessorConfiguration.csSpecificWeekConfiguration.csTypeOfOccupationConfiguration.cs
Sqlite/Schedule
@ -45,32 +45,31 @@ public static class CronUpdateSkipService
|
||||
if (depth <= 0)
|
||||
return [];
|
||||
|
||||
currentDate ??= DateOnly.FromDateTime(DateTime.Now);
|
||||
DateTimeOffset nextRunTime = currentDate.Value.ToDateTime(TimeOnly.FromDateTime(DateTime.Now));
|
||||
|
||||
DateTimeOffset nextRunTime = (currentDate?.ToDateTime(TimeOnly.MinValue) ?? DateTime.Now).ToUniversalTime();
|
||||
List<DateTimeOffset> result = [];
|
||||
|
||||
do
|
||||
{
|
||||
var lastSkip = data.FilterDateEntry(nextRunTime.DateTime).LastOrDefault();
|
||||
var lastSkippedEntry = data.FilterDateEntry(nextRunTime.DateTime).LastOrDefault();
|
||||
|
||||
if (lastSkip is { Start: not null, End: not null })
|
||||
nextRunTime = new DateTimeOffset(lastSkip.End.Value.AddDays(1), new TimeOnly(0, 0, 0), TimeSpan.Zero);
|
||||
else if (lastSkip.Date.HasValue)
|
||||
nextRunTime = new DateTimeOffset(lastSkip.Date.Value.AddDays(1), new TimeOnly(0, 0, 0), TimeSpan.Zero);
|
||||
if (lastSkippedEntry is { Start: not null, End: not null })
|
||||
nextRunTime = lastSkippedEntry.End.Value.ToDateTime(TimeOnly.MinValue).AddDays(1);
|
||||
else if (lastSkippedEntry.Date.HasValue)
|
||||
nextRunTime = lastSkippedEntry.Date.Value.ToDateTime(TimeOnly.MinValue).AddDays(1);
|
||||
|
||||
var next = expression.GetNextOccurrence(nextRunTime.ToUniversalTime(), TimeZoneInfo.Local);
|
||||
var nextOccurrence = expression.GetNextOccurrence(nextRunTime.AddMinutes(-1), TimeZoneInfo.Local);
|
||||
|
||||
if (!next.HasValue)
|
||||
if (!nextOccurrence.HasValue)
|
||||
return result;
|
||||
|
||||
nextRunTime = next.Value;
|
||||
|
||||
if (data.FilterDateEntry(nextRunTime.DateTime).Any())
|
||||
if (data.FilterDateEntry(nextOccurrence.Value.DateTime).Count != 0)
|
||||
{
|
||||
nextRunTime = nextOccurrence.Value.AddDays(1);
|
||||
continue;
|
||||
}
|
||||
|
||||
result.Add(nextRunTime);
|
||||
nextRunTime = nextRunTime.AddMinutes(1);
|
||||
result.Add(nextOccurrence.Value.ToLocalTime());
|
||||
nextRunTime = nextOccurrence.Value.AddMinutes(1);
|
||||
|
||||
} while (result.Count < depth);
|
||||
|
||||
|
Reference in New Issue
Block a user