Controller: emit lifecycle events when the VM gets restarted or deleted (#208)

* Controller: emit lifecycle events when the VM gets restarted or deleted

* vm_{scheduling,run}_time → vm_{scheduling,run}_duration for clarity

* Update VM endpoint: only update VM started time when zero
This commit is contained in:
Nikolay Edigaryev
2024-09-24 17:53:10 +04:00
committed by GitHub
parent 1730eaf67c
commit 2a2ddea62a
4 changed files with 50 additions and 0 deletions
+3
View File
@@ -57,6 +57,9 @@ type VM struct {
// by the worker using "tart fqn" command after it had pulled the image.
ImageFQN string `json:"image_fqn,omitempty"`
ScheduledAt time.Time `json:"scheduled_at,omitempty"`
StartedAt time.Time `json:"started_at,omitempty"`
Meta
}