Advertisement
pszczyg

Untitled

Jul 12th, 2017
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.66 KB | None | 0 0
  1.         public void Run(CancellationToken cancellationToken)
  2.         {
  3.             while (!cancellationToken.IsCancellationRequested)
  4.             {
  5.                 try
  6.                 {
  7.                     ReloadCacheIfNeeded();
  8.                     UpdateTopology();
  9.                 }
  10.                 catch (Exception ex)
  11.                 {
  12.                     Log.Error("Unexpected error while updating ACME topology.", ex);
  13.                 }
  14.                 finally
  15.                 {
  16.                     cancellationToken.WaitHandle.WaitOne(TimeSpan.FromMinutes(_configuration.TopologyUpdateIntervalInMinutes));
  17.                 }
  18.             }
  19.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement