Skip to content

Commit

Permalink
move ga preloading into script
Browse files Browse the repository at this point in the history
  • Loading branch information
northdpole committed Jun 26, 2024
1 parent 3f3aa65 commit ee2eba3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
20 changes: 1 addition & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,5 @@ import-neo4j:
export FLASK_APP=$(CURDIR)/cre.py && python cre.py --populate_neo4j_db

preload-map-analysis:
make docker-neo4j&\
make docker-redis&\
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make start-worker&
make dev-flask&
sleep 5
[ -d "./venv" ] && . ./venv/bin/activate &&\
export FLASK_APP=$(CURDIR)/cre.py
python cre.py --preload_map_analysis_target_url 'http://127.0.0.1:5000'
echo "Map Analysis Loaded"
killall python flask
$(shell RUN_COUNT=5 bash ./scripts/preload_gap_analysis.sh )
all: clean lint test dev dev-run
23 changes: 23 additions & 0 deletions scripts/preload_gap_analysis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#! /bin/bash

set -ex
export NEO4J_URL='neo4j://neo4j:[email protected]:7687'
export FLASK_APP=$(pwd)/cre.py

make docker-redis
make docker-neo4j

for i in $(seq 1 $RUN_COUNT); do
(rm -f "worker-$i.log" && make start-worker &> "worker-$i.log")&
done

[ -d "./venv" ] && . ./venv/bin/activate
rm -f gap_analysis_flask.log && make dev-flask&>gap_analysis_flask.log&

sleep 5

python cre.py --preload_map_analysis_target_url 'http://127.0.0.1:5000'
echo "Map Analysis Loaded"

killall python flask

0 comments on commit ee2eba3

Please sign in to comment.