- git clone
https://github.com/katrek/ukrnrg.git
- cd ukrnrg
pip install -r requirements.txt
python manage.py migrate
python manage.py runserver
to run Django servercelery -A monitoring_project worker -B
to run Celery (Celery workers are working on Redis server on Heroku)
After Celery has been running, added urls are automatically checked for response status codes with an specified interval when adding a URL to monitor system.
- After running Django server, login to the website and add URLs to be checked.
- After URLs added, type
celery -A monitoring_project worker -B
in terminal to run Celery workers to work and update connections to these URLs. - Now you can refresh your page and check, when last connections were made, they will automatically updated every time of interval.
Note:
- If Celery was activated BEFORE URL's were added to database, interval time for scanning is set to 10 (default)
- If Celery was activated AFTER URL's were added to database, interval time for scanning is set to the time that been chosen while adding to database (intervals form field)