Ejemplo n.º 1
0
        public static string Do()
        {
            var now = DateTime.Now;

            while ((DateTime.Now - now).Seconds <= Parameters.BackgroundTask.BackgroundTaskSpan)
            {
                SysLogUtilities.Maintain();
                SearchIndexUtilities.Maintain();
                SearchIndexUtilities.CreateInBackground();
                Thread.Sleep(Parameters.BackgroundTask.Interval);
                LatestTime = DateTime.Now;
            }
            HttpContext.Current.Session.Abandon();
            return(new ResponseCollection().ToJson());
        }