Skip to content

Commit cfbdb48

Browse files
committed
don't calculate build times for deleted templates (delete time for workspaces
for non-deleted templates is still calculated) Signed-off-by: Callum Styan <callumstyan@gmail.com>
1 parent db5ccda commit cfbdb48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

coderd/metricscache/metricscache.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ func (c *Cache) refreshTemplateBuildTimes(ctx context.Context) error {
8787
//nolint:gocritic // This is a system service.
8888
ctx = dbauthz.AsSystemRestricted(ctx)
8989

90-
templates, err := c.database.GetTemplates(ctx)
90+
templates, err := c.database.GetTemplatesWithFilter(ctx, database.GetTemplatesWithFilterParams{
91+
Deleted: false,
92+
})
9193
if err != nil {
9294
return err
9395
}

0 commit comments

Comments
 (0)