//Team text processes private static void JobCacheRemovedText(string key, object value, CacheItemRemovedReason reason) { LogFile.Write("| # | # | # | # | # | # | # | # | # | # | # | # " + DateTime.Now.ToString() + " TEAMMESSAGE START # | # | # | # | # | # | # | # | # | # | # | # |"); var Client = new WebClient(); try { Client.DownloadData(PingUrl); } catch (Exception ex) { LogFile.Write(ex, PingUrl); } var Update = new Processes(new Repository()); //var Update = new Processes(GlobalDbContext); Update.HandshakeUrl = HandshakeUrl; Update.SendTeamTexts(); LogFile.Write("| # | # | # | # | # | # | # | # | # | # | # | # " + DateTime.Now.ToString() + " TEAMMESSAGE FINISH # | # | # | # | # | # | # | # | # | # | # | # |\r\n"); }
//Message Notifications processes private static void JobCacheRemovedMessages(string key, object value, CacheItemRemovedReason reason) { LogFile.Write("| % | % | % | % | % | % | % | % | % | % | % | % " + DateTime.Now.ToString() + " NOTIFICATION START % | % | % | % | % | % | % | % | % | % | % | % |"); var Client = new WebClient(); try { Client.DownloadData(PingUrl); } catch (Exception ex) { LogFile.Write(ex, PingUrl); } var Update = new Processes(new Repository()); //var Update = new Processes(GlobalDbContext); Update.HandshakeUrl = HandshakeUrl; Update.SendMessages(); LogFile.Write("| % | % | % | % | % | % | % | % | % | % | % | % " + DateTime.Now.ToString() + " NOTIFICATION FINISH % | % | % | % | % | % | % | % | % | % | % | % |\r\n"); }
public ActionResult ScheduleTasks() { var Update = new Processes(reposetory); Update.HandshakeUrl = Url.Action("TextXStatus", "Account", new { ID = "##" }, "http"); Update.SendTeamTexts(); return new HttpStatusCodeResult(HttpStatusCode.NoContent); }