diff --git a/kill.sh b/kill.sh index 30c72a6..de059e6 100644 --- a/kill.sh +++ b/kill.sh @@ -3,7 +3,7 @@ # Kill all the scripts: echo "Killing the script." pkill -9 -f "$(pwd)/api/main.py" -pkill -9 -f "$(pwd)/playground/socketio/from_kafka.py" & +#pkill -9 -f "$(pwd)/playground/socketio/from_kafka.py" & # Get the name of the current directory, # and kill the monitors of the above scripts: diff --git a/playground/socketio/from_kafka.py b/playground/socketio/from_kafka.py index f880768..eefda4a 100644 --- a/playground/socketio/from_kafka.py +++ b/playground/socketio/from_kafka.py @@ -1,3 +1,8 @@ +import sys +sys.path.append(".") +sys.path.append("..") + + import random import time import socketio @@ -5,6 +10,7 @@ import asyncio import datetime import requests + # Create a Socket.IO server instance sio = socketio.AsyncServer(cors_allowed_origins = "*") diff --git a/run.sh b/run.sh index de3b5fa..390c796 100644 --- a/run.sh +++ b/run.sh @@ -3,7 +3,7 @@ # Use this to run the microservice without any docker setup. source .venv/bin/activate python3 "$(pwd)/api/main.py" --host "0.0.0.0" --port 5106 --workers 4 --script-id "kps_cnv_KBC3MoaU" & -python3 "$(pwd)/playground/socketio/from_kafka.py" & +#python3 "$(pwd)/playground/socketio/from_kafka.py" & deactivate # All done: