Example #1
0
        public async Task SetExpirated24HChecklist()
        {
            var calculatedExpirated24HChecklists = await _dbRepository.GetCalculatedExpirated24HChecklist();

            var expirated24HChecklists = await _dbRepository.GetCalculatedExpirated24HChecklist();

            foreach (var calculatedExpirated24HChecklist in calculatedExpirated24HChecklists)
            {
                if (!expirated24HChecklists.Contains(calculatedExpirated24HChecklist))
                {
                    _logger.LogWarning($"Adding new expirated checklist. Project:{calculatedExpirated24HChecklist.ProjectExternalId} CheckListId:{calculatedExpirated24HChecklist.ChecklistExternalId}");
                    await _dbRepository.AddExpirated24HChecklist(calculatedExpirated24HChecklist);
                }
            }
        }