You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm building a chart with sensor data, aggregated by 15 minutes. it works fine for older records. Today I was looking for the most recent data and I couldn't see the latest group of items.
The data is queried with the following:
# Get the latest data, from 1 hour ago until nowperiod=1.hours.ago..Time.nowvalues=Data.group_by_minute(:created_at,n: 15,range: period,format: '%H:%M').average(:value)# The time is now 7:58, this is the result'06:45': 23021.19'07:00': 23026.92'07:15': 23046.51'07:30': 23032.58'07:45': 23008.76
Since 7:45 is the latest group returned I thought it because the period is not large enough to create the next group so I tried to add 25 minutes more to the groups but it didn't help
# Get the latest data, from 1 hour ago until nowperiod=1.hours.ago..(Time.now + 25.minutes)values=Data.group_by_minute(:created_at,n: 15,range: period,format: '%H:%M').average(:value)# The time is now 7:58, this is the result'06:45': 23021.19'07:00': 23026.92'07:15': 23046.51'07:30': 23032.58'07:45': 23008.76'08:00':
'08:15':
There are objects created between 7:45 and 8:00 but the values never load that.
Is this the intended behavior? Am I missing something?
The text was updated successfully, but these errors were encountered:
I'm building a chart with sensor data, aggregated by 15 minutes. it works fine for older records. Today I was looking for the most recent data and I couldn't see the latest group of items.
The data is queried with the following:
Since 7:45 is the latest group returned I thought it because the period is not large enough to create the next group so I tried to add 25 minutes more to the groups but it didn't help
There are objects created between 7:45 and 8:00 but the values never load that.
Is this the intended behavior? Am I missing something?
The text was updated successfully, but these errors were encountered: