Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
Benjamin Ssempala 6e905db651
Trigger backend apps
1 month ago
..
bin
8b5a0f9dcf
Ft device status summary (#67)
4 years ago
07a5d87be9
introducing the BQ configurations for Grids and Cohorts
7 months ago
4880a69cba
processing and retrieving uptime for cohorts and Grids
7 months ago
4880a69cba
processing and retrieving uptime for cohorts and Grids
7 months ago
2cba6d961f
remove the database logging for security reasons
2 years ago
4672dc610a
fix - data completeness
9 months ago
bfbda4d5c4
merged in recent master branch
4 years ago
4672dc610a
fix - data completeness
9 months ago
07eeeb2a69
Added celery
1 year ago
07eeeb2a69
Added celery
1 year ago
50878fe237
set default queue
1 year ago
6e905db651
Trigger backend apps
1 month ago
5b7b92924f
Returning error messages in device monitoring
3 months ago
c180b124ff
AN-268 cleanup
1 year ago
f9e6701885
refresh deployment to pick latest changes
3 years ago
c180b124ff
AN-268 cleanup
1 year ago
db47cf7516
Add collocation unit tests
9 months ago
c7693a8892
replace v1 with v2
9 months ago

README.md

You have to be logged in to leave a comment. Sign In

clone project from github.

  • git clone https://github.com/airqo-platform/AirQo-api.git

change directory to the analytics micro-service

  • cd src/device-monitoring

create local python environment.

windows

python -m venv [local_env_name e.g env]

linux/mac

python3 -m venv [local_env_name e.g env]

activate the environment windows

  • [local_env_name]\Scripts\activate

linux/mac

  • source [local_env_name]/bin/activate

Install dependencies using the requirements.txt.

  • pip install -r requirements.txt

set environment variables in the .env file

  • required keys
    • FLASK_APP e.g app.py
    • FLASK_ENV
    • FLASK_RUN_PORT
    • MONGO_GCE_URI
    • MONGO_DEV_URI
    • DB_NAME_DEV
    • DB_NAME_PROD
    • DB_NAME_STAGE
    • REDIS_URL_PROD
    • REDIS_URL_DEV
    • REDIS_URL_STAGE
    • SECRET_KEY

Run the Flask App

  • flask run
  • celery -A app.celery beat
  • celery -A app.celery worker --loglevel=info

Run Tests.

python -m pytest
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...