mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix(site): don't mark metadata with interval: 0 as stale (#8627)
This commit is contained in:
@@ -31,7 +31,10 @@ const MetadataItem: FC<{ item: WorkspaceAgentMetadata }> = ({ item }) => {
|
||||
if (year <= 1970 || isNaN(year)) {
|
||||
return "loading"
|
||||
}
|
||||
if (item.result.age > staleThreshold) {
|
||||
// There is a special circumstance for metadata with `interval: 0`. It is
|
||||
// expected that they run once and never again, so never display them as
|
||||
// stale.
|
||||
if (item.result.age > staleThreshold && item.description.interval > 0) {
|
||||
return "stale"
|
||||
}
|
||||
return "valid"
|
||||
|
||||
Reference in New Issue
Block a user