The sensors.AFRICA API receiving, storing, and processing data received from sensors across the continentent. Accessible at https://api.sensors.africa/
This PR introduces the following changes to the list_nodes action on the NodesView
Allow non-authenticated access to fetch nodes, e.g v2.map.aq.sensors
Optimize to fetch only LastActiveNodes within the last 1 hour and make joins to fetch nodes and locations. We need to only display statistics within the last 5 min range, and we post new data every 3-5 mins
PS: As per @gideonmaina the ideal time frame to tell an active node is that which has transmitted data within last 1 year (Old sensors, last updated in 2017,2018 still appear in DB & yet to be decommissioned)
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
Description
This PR introduces the following changes to the
list_nodes
action on the NodesViewv2.map.aq.sensors
nodes
andlocations
. We need to only display statistics within the last 5 min range, and we post new data every 3-5 minsPS: As per @gideonmaina the ideal time frame to tell an active node is that which has transmitted data within last 1 year (Old sensors, last updated in 2017,2018 still appear in DB & yet to be decommissioned)
Type of change
Checklist: