mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 09:54:16 +02:00
Fix Worker-Cycle:
Periodic set last execution, Print Running Worker-Names when done
This commit is contained in:
@ -88,6 +88,8 @@ public abstract class BaseWorker : Identifiable
|
||||
DateTime endTime = DateTime.UtcNow;
|
||||
Log.Info($"Completed {this}\n\t{endTime.Subtract(startTime).TotalMilliseconds} ms");
|
||||
this.State = WorkerExecutionState.Completed;
|
||||
if(this is IPeriodic periodic)
|
||||
periodic.LastExecution = DateTime.UtcNow;
|
||||
});
|
||||
task.Start();
|
||||
this.State = WorkerExecutionState.Running;
|
||||
|
Reference in New Issue
Block a user