I have a continuous running webjob that gets triggered to do background tasks. When the job is triggered to do the work I cannot find a way to trace or check whether the job has completed successfully or not.
Is there a way that I could easily check the status of the triggered job for a specific message?
var taskId =_service.GetTaskId();
CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
CloudQueue _cloudQueue = queueClient.GetQueueReference("taskqueue");
_cloudQueue.CreateIfNotExists();
var taskInfo = new TaskInformation
{
TaskId = taskId,
};
var queueMessage = new CloudQueueMessage(JsonConvert.SerializeObject(taskInfo));
await _cloudQueue.AddMessageAsync(queueMessage);
// is it possible to get the status of the queueMessage here?
// Whether the queueMessage is completed running successfully or it has failed?
Function:
public async Task Process(
[QueueTrigger("taskqueue")] TaskInformation taskInfo, string id,
int dequeueCount)
{
//this process might take a while to complete...
await _application.Run(taskInfo.TaskId);
}