merge historyitem and statusitem
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user