private async Task RunAndRescheduleNoThrow()
        {
            try
            {
                var logger = new SynchronizationLogger(_profileId, _profileName);

                using (AutomaticStopwatch.StartInfo(s_logger, string.Format("Running synchronization profile '{0}'", _profileName)))
                {
                    await _synchronizer.SynchronizeNoThrow(logger);
                }

                GC.Collect();
                GC.WaitForPendingFinalizers();
                var synchronizationReport = logger.GetReport();
                _reportSink.PostReport(synchronizationReport);
            }
            catch (Exception x)
            {
                s_logger.Error(null, x);
            }
            finally
            {
                _lastRun = DateTime.UtcNow;
            }
        }
示例#2
0
 public void Dispose()
 {
     _reportSink?.PostReport(GetReport());
     _reportSink = null;
 }