Ejemplo n.º 1
0
        // This method is only used by the CommonCacheInvalidation which is run via the
        // Windows task scheduler
        public static void ProcessPendingTransactions()
        {
            string message;

            try
            {
                VotePage.LogInfo("CommonCacheInvalidation", "Started");

                var table = CacheInvalidation.GetUnprocessedData();
                var count = table.Sum(ProcessTransaction);

                message =
                    $"{table.Count()} CacheInvalidation rows processed, {count} Page rows deleted";
            }
            catch (Exception ex)
            {
                VotePage.LogException("CommonCacheInvalidation", ex);
                message = $"Exception: {ex.Message} [see exception log for details]";
            }
            VotePage.LogInfo("CommonCacheInvalidation", message);
        }