Ejemplo n.º 1
0
        public async Task UpdateApprenticeshipProgrammesAsync([QueueTrigger(QueueNames.UpdateApprenticeProgrammesQueueName, Connection = "QueueStorage")] string message, TextWriter log)
        {
            if (_jobsConfig.DisabledJobs.Contains(JobName))
            {
                _logger.LogDebug($"{JobName} is disabled, skipping ...");
                return;
            }

            _logger.LogInformation("Starting populating standards and frameworks into reference data store.");

            try
            {
                await _client.UpdateApprenticeshipProgrammesAsync();

                _logger.LogInformation("Finished populating standards and frameworks into reference data store.");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Unable to update standards and frameworks.");
                throw;
            }
        }
Ejemplo n.º 2
0
        public async Task UpdateStandardsAndFrameworks([TimerTrigger(Schedules.FourAmDaily, RunOnStartup = true)] TimerInfo timerInfo, TextWriter log)
        {
            if (_jobsConfig.DisabledJobs.Contains(this.GetType().Name))
            {
                _logger.LogDebug($"{this.GetType().Name} is disabled, skipping ...");
                return;
            }

            _logger.LogInformation("Starting populating standards and frameworks into reference data store.");

            try
            {
                await _client.UpdateApprenticeshipProgrammesAsync();

                _logger.LogInformation("Finished populating standards and frameworks into reference data store.");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Unable to update standards and frameworks.");
                throw;
            }
        }