From ca0c9b61088237464f4cc1d579245114d867ca09 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Wed, 23 Aug 2023 01:33:38 -0400 Subject: [PATCH] show recent unpinged clusters in list queries --- apps/core/lib/core/schema/cluster.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/core/lib/core/schema/cluster.ex b/apps/core/lib/core/schema/cluster.ex index 81fe2d059..991d5c81e 100644 --- a/apps/core/lib/core/schema/cluster.ex +++ b/apps/core/lib/core/schema/cluster.ex @@ -31,7 +31,7 @@ defmodule Core.Schema.Cluster do def active(query \\ __MODULE__) do expired = expiry() - from(q in query, where: q.pinged_at >= ^expired) + from(q in query, where: q.pinged_at >= ^expired or (is_nil(q.pinged_at) and q.inserted_at >= ^expired)) end def expired(query \\ __MODULE__) do