in src/WebJobs.Extensions.Timers.Storage/StorageScheduleMonitor.cs [92:121]
public override async Task<ScheduleStatus> GetStatusAsync(string timerName)
{
BlobClient statusBlobClient = await GetStatusBlobClient(timerName, createContainerIfNotExists: false);
try
{
string statusLine;
var downloadResponse = await statusBlobClient.DownloadAsync();
using (StreamReader reader = new StreamReader(downloadResponse.Value.Content))
{
statusLine = reader.ReadToEnd();
}
ScheduleStatus status;
using (StringReader stringReader = new StringReader(statusLine))
{
status = (ScheduleStatus)_serializer.Deserialize(stringReader, typeof(ScheduleStatus));
}
return status;
}
catch (RequestFailedException exception)
{
if (exception.Status == 404)
{
// we haven't recorded a status yet
return null;
}
throw;
}
}