public void Execute() { try { // Validates that every setting is set correct in the Configure area. Validation.ValidateSettings(_intersurfSettings); // Add data to VariantData list OrganizeData(); // Save data and update stock _aoProductService.SaveVariantData(_variantData, _updaterName); _logger.Information("IntersurfScheduleSaver.Execute() done." + Environment.NewLine + _variantData.Count + " variants in total"); } catch (Exception ex) { Exception inner = ex; while (inner.InnerException != null) { inner = inner.InnerException; } _logger.Error("IntersurfScheduleSaver.Execute(): " + inner.Message, ex); } }
public void Execute() { try { // Validates that every setting is set correct in the Configure area. ValidateSettings(); // Gets the data content from asmx service and saves in csv file GetData(); // Add data to VariantData list OrganizeData(); _aoProductService.SaveVariantData(_variantData, _updaterName); _logger.Information("BonvitaSchedule.Execute() done. Doing nothing yet"); } catch (Exception ex) { Exception inner = ex; while (inner.InnerException != null) { inner = inner.InnerException; } _logger.Error("BonvitaSchedule.Execute(): " + inner.Message, ex); } }
public void Execute() { try { var runningTime = System.Diagnostics.Stopwatch.StartNew(); ValidateSettings(); GetData(); OrganizeData(); _aoProductService.SaveVariantData(_variantData, _updaterName); // Important this is done before string logText = GetLogText(); SetSkipNumber(); runningTime.Stop(); var elapsedsecs = runningTime.Elapsed.Seconds; var logTime = System.Diagnostics.Stopwatch.StartNew(); _logger.Information(logText + Environment.NewLine + "Seconds elapsed: " + elapsedsecs + " (Max 60)"); logTime.Stop(); var logTimeMili = logTime.Elapsed.Milliseconds; // _logger.Information("Mili seconds to do one log: " + logTimeMili); } catch (Exception ex) { Exception inner = ex; while (inner.InnerException != null) { inner = inner.InnerException; } _logger.Error("STMSchedule.Execute(): " + inner.Message, ex); } }