Skip to content

Commit

Permalink
Merge pull request #22962 from kbrock/active_server
Browse files Browse the repository at this point in the history
MiqServer#recently_active can handle values in the future
  • Loading branch information
jrafanie authored Mar 28, 2024
2 parents 5a25f61 + 4a57c46 commit 0a98e44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class MiqServer < ApplicationRecord
default_value_for(:zone) { Zone.default_zone }

scope :active_miq_servers, -> { where(:status => STATUSES_ACTIVE) }
scope :recently_active, -> { where(:last_heartbeat => 10.minutes.ago.utc...Time.now.utc) }
scope :recently_active, -> { where(:last_heartbeat => 10.minutes.ago.utc..) }
scope :with_zone_id, ->(zone_id) { where(:zone_id => zone_id) }
virtual_delegate :description, :to => :zone, :prefix => true, :allow_nil => true, :type => :string

Expand Down

0 comments on commit 0a98e44

Please sign in to comment.