Thanks for the beer Jacob!
It is very strange.
It should sleep for 10 seconds then it should log INFO: started LetterSendTask task
Now I do see one problem (a logic bug) in the LetterSendTask which could cause it to never send anything and never complete the task but it is unexpected conditions.
Letter letter = new Letter(this.letterGuid);
if (letter.LetterGuid == Guid.Empty) return;
if (letter.SendCompleteUtc > DateTime.MinValue) return;
if (letter.SendClickedUtc == DateTime.MinValue) return;
so the return there would prevent it from marking the task as complete so the task keeps running but isn't doing anything. I am correcting this logic now for the final release as follows.
Letter letter = new Letter(this.letterGuid);
if (letter.LetterGuid == Guid.Empty)
{
log.Error("LetterSendTask letter not found so ending.");
ReportStatus();
return;
}
if (letter.SendCompleteUtc > DateTime.MinValue)
{
log.Error("LetterSendTask SendCompleteUtc already set so ending.");
ReportStatus();
return;
}
if (letter.SendClickedUtc == DateTime.MinValue)
{
log.Error("LetterSendTask SendClickedUtc has an invalid value so ending.");
ReportStatus();
return;
}
This way it will report the problem in the log and end the task.
I will post here again as soon as the release ships or if I make another preview build with this fixed. I can only guess that one of these unexpected conditions is happening.
Best,
Joe