예제 #1
0
        public async Task FetchDataEveryMinute([TimerTrigger("%DataFetchingSchedule%")] TimerInfo myTimer)
        {
            var fetchedData = await _client.GetAsync(Environment.GetEnvironmentVariable("DataFetchingUrl"));

            var fetchedContent = await fetchedData.Content.ReadAsStringAsync();

            _log.Info($"Pulled data from {Environment.GetEnvironmentVariable("DataFetchingUrl")}");
            _tableStorage.AddDataToTable(fetchedData.StatusCode.ToString(), "AttemptLog");
            _blobStorage.AddDataToBlob(Convert.ToString(fetchedData) + fetchedContent);
        }