diff --git a/WakeyWakey.cs b/WakeyWakey.cs index 185a431..183eee8 100644 --- a/WakeyWakey.cs +++ b/WakeyWakey.cs @@ -1,28 +1,28 @@ -// using System; -// using System.Net.Http; -// using System.Threading.Tasks; -// using Microsoft.Azure.WebJobs; -// using Microsoft.Azure.WebJobs.Host; -// using Microsoft.Extensions.Logging; +using System; +using System.Net.Http; +using System.Threading.Tasks; +using Microsoft.Azure.WebJobs; +using Microsoft.Azure.WebJobs.Host; +using Microsoft.Extensions.Logging; -// namespace aka.terribledev.io -// { -// public static class WakeyWakey -// { -// static HttpClient client = new HttpClient(); -// [FunctionName("WakeyWakey")] -// public async static Task Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, ILogger log) -// { -// log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); -// using (var result = await client.GetAsync("https://aka.terribledev.io", HttpCompletionOption.ResponseContentRead)) -// { -// if (!result.IsSuccessStatusCode) -// { -// log.LogCritical("Error waking up redirect", result); -// } -// var content = await result.Content.ReadAsStringAsync(); -// log.LogInformation($"Recieved status code ${result.StatusCode} with body ${content}"); -// } -// } -// } -// } +namespace aka.terribledev.io +{ + public static class WakeyWakey + { + static HttpClient client = new HttpClient(); + [FunctionName("WakeyWakey")] + public async static Task Run([TimerTrigger("0 */5 * * * *")]TimerInfo myTimer, ILogger log) + { + log.LogInformation($"C# Timer trigger function executed at: {DateTime.Now}"); + using (var result = await client.GetAsync("https://aka.terribledev.io", HttpCompletionOption.ResponseContentRead)) + { + if (!result.IsSuccessStatusCode) + { + log.LogCritical("Error waking up redirect", result); + } + var content = await result.Content.ReadAsStringAsync(); + log.LogInformation($"Recieved status code ${result.StatusCode} with body ${content}"); + } + } + } +} diff --git a/redirectFunctionTrig.cs b/redirectFunctionTrig.cs index b0aeb7d..ef935bf 100644 --- a/redirectFunctionTrig.cs +++ b/redirectFunctionTrig.cs @@ -32,6 +32,7 @@ namespace TerribleDev ["things-to-know"] = "https://github.com/TerribleDev/Things-to-know", ["code101"] = "https://github.com/NashuaCodes/Decks", ["webpack/timereport"] = "https://gist.github.com/TerribleDev/8677821c3e174659250df1f6bba9d7c3" + ["webperf"] = "https://github.com/TerribleDev/WebPerformanceChecklist" }; public static class redirectFunctionTrig