Skip to content

Commit

Permalink
fix runapp script and move to pypi 0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
reiinakano committed Jun 2, 2017
1 parent 3f0d99d commit 258813c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def run_tests(self):

setup(
name='xcessiv',
version='0.3.2',
version='0.3.4',
url='https://github.com/reiinakano/xcessiv',
license='Apache License 2.0',
author='Reiichiro Nakano',
Expand Down
2 changes: 1 addition & 1 deletion xcessiv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from flask import Flask


__version__ = '0.3.2'
__version__ = '0.3.4'


app = Flask(__name__, static_url_path='/static', static_folder='ui/build/static')
Expand Down
12 changes: 2 additions & 10 deletions xcessiv/scripts/runapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@
from six import iteritems


def wrap(task, pipe):
def wrapper(*args, **kwargs):
sys.stdout = pipe
task(*args, **kwargs)
return wrapper


def main():
parser = argparse.ArgumentParser(description='Launch Xcessiv server and workers')
parser.add_argument('-w', '--worker', help='Define number of workers', type=int)
Expand Down Expand Up @@ -62,12 +55,11 @@ def main():

processes = []
try:
conn1, conn2 = Pipe(duplex=False)
server_proc = Process(target=wrap(launch, conn2), args=(app,))
server_proc = Process(target=launch, args=(app,))
server_proc.start()

for i in range(app.config['NUM_WORKERS']):
p = Process(target=wrap(runworker, conn2), args=(app,))
p = Process(target=runworker, args=(app,))
processes.append(p)
p.start()

Expand Down

0 comments on commit 258813c

Please sign in to comment.