richardogoma / bitcoin-rate-tracker

A web application or microservice for tracking and visualizing Bitcoin rates across major currencies.
MIT License
0 stars 1 forks source link

ETL client restarts every time the WSGI file is run #44

Closed richardogoma closed 1 year ago

richardogoma commented 1 year ago

Run tests based on this:

richardogoma commented 1 year ago

Set DEBUG = False in the production environment

richardogoma commented 1 year ago

Run tests based on this:

  • Move the Data Streaming Client to the __init__.py file to see if it prevents the restarting of the ETL client.

    • Test this by first trying to do a print function in the __init__.py file and observing if it is printed during the development server restart.

The test with the print function in the __init__.py didn't work, because the __init__.py file is run when the web_app module is imported.

richardogoma commented 1 year ago

Set DEBUG = False in the production environment

In addition to this, I set up a robot to make a HEAD request to the API on PythonAnywhere every 5 minutes using https://uptimerobot.com/dashboard#mainDashboard because of this thread: https://www.pythonanywhere.com/forums/topic/13893/