overlay-market / overlay-risk

Risk metrics for various data streams
MIT License
13 stars 4 forks source link

[WIP] Shell scripts to run and kill python scripts #42

Open deepsp94 opened 2 years ago

deepsp94 commented 2 years ago

The python script influx_metrics_univ3_parallel.py uses pystable which has an unidentified memory leak. To get around that, the shell script influx_metrics_univ3.sh will be called periodically to kill and restart the python script (periodic calls through crontab).

To keep things consistent, the python script for pulling cumulatives is also being called through a shell script now and can be killed through a shell script too.

The shell scripts also:

  1. make it easy to read environment variables and
  2. run python scripts in a poetry env without explicitly running the shell script in a poetry shell

Next step is to capture and structure the logs produced by these scripts.

deepsp94 commented 2 years ago

@mikeyrf this one's ready for review too. Would suggest reviewing this once https://github.com/overlay-market/overlay-risk/pull/41 is merged.