Skip to content

Commit ccb5e58

Browse files
committed
Moving from paste to gunicorn
1 parent 25ac4bd commit ccb5e58

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scripts/mailman-api

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ def parse_options():
1818
default='/usr/lib/mailman',
1919
help=("Path to mailman libs directory. "
2020
"Default: '/usr/lib/mailman'."))
21+
parser.add_option("-w", "--workers", dest="workers",
22+
default=3, help="Number of workers. Default: 3")
2123
parser.add_option("-d", "--debug", action="store_true", default=False,
2224
help="Print debug information")
2325

@@ -37,4 +39,5 @@ if __name__ == '__main__':
3739

3840
host, port = opt.bind.split(':')
3941

40-
run(application, host=host, port=port, debug=opt.debug, server='paste')
42+
run(application, host=host, port=port, debug=opt.debug, server='gunicorn',
43+
max_requests=1000, workers=opt.workers)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def find_version(*file_paths):
3636
description='REST API daemon to interact with Mailman 2',
3737
long_description=read('README.rst'),
3838
install_requires=[
39-
"Paste >= 1.7.5.1",
39+
"gunicorn >= 18.0",
4040
"bottle >= 0.11.6",
4141
],
4242
tests_require=TEST_REQUIREMENTS,

0 commit comments

Comments
 (0)