Skip to content

Commit

Permalink
show recent unpinged clusters in list queries
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Aug 23, 2023
1 parent 1b40abf commit ca0c9b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/core/lib/core/schema/cluster.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ca0c9b6

Please sign in to comment.