Chron script for loading database

This commit is contained in:
jmosrael@gmail.com
2024-07-17 22:50:25 -07:00
parent 6d03e450c9
commit bc3455f5d0
8 changed files with 56 additions and 10 deletions

16
loader/chron-script.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/bash
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
PYTHON_VEN="$parent_path"/venv/bin/python
if [ ! -f $PYTHON_VEN ]; then
echo "Setting up new VENV"
python -m venv venv
echo "Installing requirements."
source ./venv/bin/activate
pip install -r requirements.txt
deactivate
fi
echo "Start DB Creation"
$parent_path/venv/bin/python createrushdatabase.py