Commit 3780b59b authored by BAIRE Anthony's avatar BAIRE Anthony

add the ALLGO_CONTROLLER_ADDR setting

parent 9708c4fb
...@@ -22,6 +22,9 @@ from .tokens import Token ...@@ -22,6 +22,9 @@ from .tokens import Token
from .models import Webapp, Job, User, AllgoUser, WebappVersion from .models import Webapp, Job, User, AllgoUser, WebappVersion
from .forms import UserForm, HomeSignupForm from .forms import UserForm, HomeSignupForm
import config.env
CONTROLLER_ADDR = config.env.ALLGO_CONTROLLER_HOST, int(config.env.ALLGO_CONTROLLER_PORT)
log = logging.getLogger('allgo') log = logging.getLogger('allgo')
...@@ -47,7 +50,7 @@ def update_webapp_metadata(repository, url): ...@@ -47,7 +50,7 @@ def update_webapp_metadata(repository, url):
def notify_controler(): def notify_controler():
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(5) sock.settimeout(5)
sock.connect((os.environ.get('ALLGO_CONTROLLER_HOST'), int(os.environ.get('ALLGO_CONTROLLER_PORT')))) sock.connect(CONTROLLER_ADDR)
sock.settimeout(None) sock.settimeout(None)
sock.makefile('rb', 0) sock.makefile('rb', 0)
sock.shutdown(socket.SHUT_RDWR) sock.shutdown(socket.SHUT_RDWR)
......
...@@ -252,3 +252,4 @@ LOGGING = { ...@@ -252,3 +252,4 @@ LOGGING = {
}, },
}, },
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment