Skip to content
Snippets Groups Projects
Commit 8e0be06e authored by Mitchell Moore's avatar Mitchell Moore
Browse files

Merge branch 'feat-variables' into 'master'

added vars file to be used by run.py and tasks.py

See merge request mmoo97/flask_user_reg!43
parents 50220f11 712d5d8a
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import os
import time
import signal
import tasks
import vars
from flask import session
from flask_socketio import SocketIO, join_room
......@@ -15,8 +16,8 @@ monkey.patch_all(subprocess=True)
config_name = os.getenv('FLASK_CONFIG')
app = create_app(config_name)
app.config['SECRET_KEY'] = 'vnkdjnfjknfl1232#'
socketio = SocketIO(app, message_queue='amqp://reggie:reggie@ohpc:5672/socketio')
app.config['SECRET_KEY'] = vars.key
socketio = SocketIO(app, message_queue= vars.message_queue)
@socketio.on('connect')
def socket_connect():
......
......@@ -2,14 +2,15 @@ from celery import Celery
import time
from flask_socketio import SocketIO
import subprocess
import vars
from gevent import monkey
monkey.patch_all(subprocess=True)
broker_url = 'amqp://reggie:reggie@ohpc:5672/'
broker_url = vars.broker_url
celery = Celery('flask_user_reg', broker=broker_url)
socketio = SocketIO(message_queue='amqp://reggie:reggie@ohpc:5672/socketio')
socketio = SocketIO(message_queue=vars.message_queue)
def send_msg(event, room):
print("Post '{}' to room '{}'".format(event,room))
......
id = 'reggie'
password = 'reggie'
key = 'vnkdjnfjknfl1232'
broker_url = 'amqp://' + id + ':' + password + '@ohpc:5672/'
message_queue = broker_url + 'socketio'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment