Beispiel #1
0
		/*
		 # runs blobroot/monitor.py
		 # pull 48 hours of diagnostics from odata feed into a file
		 # run logparser queries against the file
		 # output charts (gifs) and/or tables (htmls) to charts container in azure storage
		 # calls blobroot/dashboard.py to update pages that include charts and tables  
		*/
		public static void MonitorAdmin(object o, ElapsedEventArgs args)
		{
			GenUtils.LogMsg("status", "MonitorAdmin", null);
			try
			{
				PythonUtils.RunIronPython(local_storage_path, CalendarAggregator.Configurator.monitor_script_url, new List<string>() { "", "", "" });
			}
			catch (Exception e)
			{
				GenUtils.LogMsg("exception", "MonitorAdmin", e.Message + e.StackTrace);
			}
		}
Beispiel #2
0
		// runs _admin.py from blobroot/admin, most duties have migrated out of python and into c#
		public static void IronPythonAdmin(object o, ElapsedEventArgs e)
		{
			try
			{
				GenUtils.LogMsg("status", "IronPythonAdmin", null);
				PythonUtils.RunIronPython(local_storage_path, CalendarAggregator.Configurator.iron_python_admin_script_url, new List<string>() { "", "", "" });

			}
			catch (Exception ex)
			{
				GenUtils.LogMsg("exception", "IronPythonAdmin", ex.Message + ex.StackTrace);
			}
		}
Beispiel #3
0
 public static void MakeTablesAndCharts(Object o, ElapsedEventArgs e)
 {
     GenUtils.LogMsg("status", "MakeTablesAndCharts", null);
     try
     {
         PythonUtils.RunIronPython(WebRole.local_storage_path, CalendarAggregator.Configurator.charts_and_tables_script_url, new List <string>()
         {
             "", "", ""
         });
     }
     catch (Exception ex)
     {
         GenUtils.PriorityLogMsg("exception", "MakeTablesAndCharts", ex.Message + ex.StackTrace);
     }
 }
Beispiel #4
0
            public override void ExecuteResult(ControllerContext context)
            {
                // this one calls out to python, can take a while
                context.HttpContext.Server.ScriptTimeout = CalendarAggregator.Configurator.webrole_script_timeout_seconds;
                var args = new List <string>()
                {
                    this.fusecal_url, this.filter, this.tz_source, this.tz_dest
                };
                var ics = PythonUtils.RunIronPython(WebRole.local_storage_path, CalendarAggregator.Configurator.fusecal_dispatcher, args);

                new ContentResult
                {
                    ContentType     = "text/calendar",
                    Content         = ics,
                    ContentEncoding = UTF8
                }.ExecuteResult(context);
            }