mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
Fix heartbeats in future from messing with active_user data
This commit is contained in:
@@ -8,6 +8,7 @@ class Cache::ActiveUsersGraphDataJob < Cache::ActivityJob
|
||||
hours = Heartbeat.coding_only
|
||||
.with_valid_timestamps
|
||||
.where("time > ?", 24.hours.ago.to_f)
|
||||
.where("time < ?", Time.current.to_f)
|
||||
.select("(EXTRACT(EPOCH FROM to_timestamp(time))::bigint / 3600 * 3600) as hour, COUNT(DISTINCT user_id) as count")
|
||||
.group("hour")
|
||||
.order("hour DESC")
|
||||
|
||||
Reference in New Issue
Block a user