Skip to content

Commit

Permalink
fix for 0.3 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
bazilio91 authored Jan 26, 2017
1 parent de10a17 commit fec176e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 0 additions & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ test:
pre:
- docker run -d -p 8500:8500 e96tech/consul-server -advertise 127.0.0.1 -bootstrap -dc circle -domain local
- curl --retry 10 --retry-delay 5 -v http://localhost:8500
- sed -i '1i load_module "modules/ngx_stream_module.so";' /home/ubuntu/vergilius/src/vergilius/templates/service_validate.html

deployment:
dockerhub_master:
Expand Down
2 changes: 2 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
user root;
worker_processes 4;

load_module "modules/ngx_stream_module.so";

error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zope.component==4.2.2
zope.event==4.1.0
zope.interface==4.1.3
python-consul==0.4.7
python-consul==0.7.0
tornado==4.3
funcsigs==1.0.0
mock==1.3.0
8 changes: 7 additions & 1 deletion src/vergilius/loop/nginx_reloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

import vergilius

try:
from subprocess import DEVNULL # py3k
except ImportError:
import os
DEVNULL = open(os.devnull, 'wb')


class NginxReloader(object):
nginx_update_event = Event()
Expand All @@ -18,7 +24,7 @@ def nginx_reload(cls):
yield cls.nginx_update_event.wait()
cls.nginx_update_event.clear()
vergilius.logger.info('[nginx]: reload')
subprocess.check_call([vergilius.config.NGINX_BINARY, '-s', 'reload'], stdout=subprocess.DEVNULL)
subprocess.check_call([vergilius.config.NGINX_BINARY, '-s', 'reload'], stdout=DEVNULL)

@classmethod
def queue_reload(cls):
Expand Down
2 changes: 2 additions & 0 deletions src/vergilius/templates/service_validate.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load_module "modules/ngx_stream_module.so";

worker_processes 1;

pid {{pid_file}};
Expand Down

0 comments on commit fec176e

Please sign in to comment.