Releases: CodeForAfrica/sensors.AFRICA-api
Releases · CodeForAfrica/sensors.AFRICA-api
v0.4.9
Hotfix remove temp file if exists when running upload_to_ckan command.
FAILURE -- archive_data
Name: sensorsafrica.tasks.archive_data
Execution time: 1 minutes 46 seconds
Task ID: 0e7f794b-f13d-41f8-8636-ea1c60520731
args: []
kwargs: {}
Exception: [Errno 2] No such file or directory: '/tmp/january_2020_sensor_data_archive.csv'
Info:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
return self.run(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/sentry_sdk/integrations/celery.py", line 66, in _inner
reraise(*_capture_exception())
File "/usr/local/lib/python3.6/site-packages/sentry_sdk/_compat.py", line 44, in reraise
raise value
File "/usr/local/lib/python3.6/site-packages/sentry_sdk/integrations/celery.py", line 64, in _inner
return f(*args, **kwargs)
File "/src/sensorsafrica/tasks.py", line 12, in archive_data
call_command("upload_to_ckan")
File "/usr/local/lib/python3.6/site-packages/django/core/management/__init__.py", line 131, in call_command
return command.execute(*args, **defaults)
File "/usr/local/lib/python3.6/site-packages/django/core/management/base.py", line 330, in execute
output = self.handle(*args, **options)
File "/src/sensorsafrica/management/commands/upload_to_ckan.py", line 106, in handle
os.remove(filepath)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/january_2020_sensor_data_archive.csv'
v0.4.8
BUG FIX
- Make the query for the last active sensor to be faster so that the lastactive sensors show up on the map faster and in the
/v2/nodes
query
v0.4.7
Introduce CKAN_ARCHIVE_*
variables
v0.4.6
Introduce missing code/functionality for the following routes.
-
/v1/sensors/{sensor_id}/
- all measurements of the last 5 minutes for one sensor -
/v1/filter?city=&country=&type=
- 5 minutes filtered by query -
/static/v2/data.json
- average of all measurements per sensor of the last 5 minutes for all sensors -
/static/v2/data.1h.json
- average of all measurements per sensor of the last hour -
/static/v2/data.24h.json
- average of all measurements per sensor of the 24 hours -
static/v2/data.dust.min.json
- same as data.json but dust sensors only -
/static/v2/data.temp.min.json
- same as data.json but temp
v0.4.5
Added environment variable SENSORSAFRICA_CELERY_SLACK_WEBHOOK_FAILURES_ONLY
to allow setup of celery slack to only send out failures if needed.
v0.4.4
- Slack notifications on the celery background tasks
SENSORSAFRICA_CELERY_SLACK_WEBHOOK
- Push to open Africa archive
openAFRICA_API_KEY
openAFRICA_CFA_ID
https://africaopendata.org - Revert public users to see data past 3 months only so now they can see all data.
- last_data_received_at should be based on last sent PM sensor data
- Admin tweaks
v0.4.3
Changed the returned property names for /v2/nodes
:
prev_location
-->moved_to
since the previous_location is actually the location the node has moved_to.- added the node
id
anduid
for faster identification - fix get sensors belonging to node id
- prev_location is actually new_location/current_location
- refactor and comments
- fix typos
v0.4.2
- Routes to get all nodes that are active and inactive .i.e /v2/nodes
- Also returns information if sensor moved locations
- Also returns last 5 mins stats information i.e. average, min, max
- Added task to cache last active sensors every 5 mins.
API v0.4.1
Fix archive data background task to use temp folder.
API v0.4.0
- Celery controls the creation and execution of cron jobs
- Flower web interface to see an configure jobs