예제 #1
0
        public async Task Execute(IJobExecutionContext context)
        {
            try
            {
                var stopwatch = new Stopwatch();

                _logger.LogInformation("******* Starting Accounts Sync *******");
                stopwatch.Start();

                await _synchronizer.SyncAccounts();

                _logger.LogInformation($"Data synced in {stopwatch.Elapsed}\n");
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, "Error encountered while running job");
            }
        }