merge historyitem and statusitem

This commit is contained in:
Jonathan Jenne
2022-12-20 12:00:15 +01:00
parent 835467f0d7
commit 343f47ca29
16 changed files with 187 additions and 219 deletions

View File

@@ -8,18 +8,17 @@ Namespace Scheduler.Jobs
Private Function IJob_Execute(context As IJobExecutionContext) As Task Implements IJob.Execute
Dim oArgs = MyBase.InitializeJob(context)
Dim oRandom = New Random()
Logger.Info("I'm a debug Job!")
Logger.Info("Name: [{0}]", Name)
Dim oTotal As Integer = oRandom.Next(5, 15)
For index = 1 To oTotal
Logger.Info("We are still waiting [{0}/{1}]", index, oTotal)
LogInfo("We are still waiting [{0}/{1}]", index, oTotal)
Dim oResult = New JobResult() With {
.Description = $"I'm a debug job and my result was [{Guid.NewGuid}]."
}
Threading.Thread.Sleep(1000)
Next
context.Result = oResult
CompleteJob("Done!")
Return Task.FromResult(True)
Return CompleteJob("Finished, not waiting anymore!")
End Function
End Class
End Namespace