This commit is contained in:
piair 2023-10-03 00:23:06 +02:00
parent 291b7332bc
commit 8991e4f4c8
3 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ import redis
# redis part for live update # redis part for live update
redis_client = redis.StrictRedis(host='localhost', port=6379, db=0) redis_client = redis.StrictRedis(host='127.0.0.1', port=6379, db=0)
pubsub = redis_client.pubsub() pubsub = redis_client.pubsub()
pubsub.subscribe('console') pubsub.subscribe('console')

View File

@ -1,4 +1,4 @@
service grafana-server start service grafana-server start
service nginx start service nginx start
nohup redis-server & nohup redis-server &
gunicorn --reload -w 1 --worker-class gevent -b 0.0.0.0:6666 'app:app' gunicorn --reload --worker-class gevent -b 0.0.0.0:6666 'app:app'

View File

@ -20,7 +20,7 @@
const eventSource = new EventSource('/stream'); const eventSource = new EventSource('/stream');
eventSource.onmessage = (event) => { eventSource.onmessage = (event) => {
console.log("etqhbbqetbqedrtqberzegr"); console.log("je ne comprend vraiment plus rien, meme git me casse les couilles");
const newOutput = document.createElement('div'); const newOutput = document.createElement('div');
newOutput.textContent = event.data; newOutput.textContent = event.data;
consoleElement.appendChild(newOutput); consoleElement.appendChild(newOutput);