-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[usage] Filter out not started workspace instances #12696
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -224,10 +223,8 @@ type WorkspaceInstanceForUsage struct { | |||
Type WorkspaceType `gorm:"column:workspaceType;type:char;size:16;default:regular;" json:"workspaceType"` | |||
UsageAttributionID AttributionID `gorm:"column:usageAttributionId;type:varchar;size:60;" json:"usageAttributionId"` | |||
|
|||
CreationTime VarcharTime `gorm:"column:creationTime;type:varchar;size:255;" json:"creationTime"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removes these fields as they are just confusing. They did not get removed originally when we switched to stoppingTime
@@ -134,6 +134,7 @@ func ListWorkspaceInstancesInRange(ctx context.Context, conn *gorm.DB, from, to | |||
Where( | |||
conn.Where("wsi.stoppingTime >= ?", TimeToISO8601(from)).Or("wsi.stoppingTime = ?", ""), | |||
). | |||
Where("wsi.startedTime != ?", ""). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thansk @easyCZ ! 🚀
@@ -134,6 +134,7 @@ func ListWorkspaceInstancesInRange(ctx context.Context, conn *gorm.DB, from, to | |||
Where( | |||
conn.Where("wsi.stoppingTime >= ?", TimeToISO8601(from)).Or("wsi.stoppingTime = ?", ""), | |||
). | |||
Where("wsi.startedTime != ?", ""). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we filter out any without a started time
4b7c7b9
to
b0ff117
Compare
Description
Related Issue(s)
Fixes #
How to test
Release Notes
Documentation
Werft options: