How to use it with uWSGi
vladimircape opened this issue · 2 comments
vladimircape commented
i used uwsgi+nginx and want to start Python application with param. Right these solution is working
python3.5 uswgi.py matcher
what is uwsgi command param to send param "matcher" to python?
I tried pyargv but it didn't work
uswgi file
from flask_script import Manager,Command
from mainApp import application
import entityHelper
manager = Manager(application)
class MatcherLoad(Command):
"Load new entity to matcher"
def run(self):
entityHelper.loadDataFromFileToMem()
application.run()
manager.add_command('matcher', MatcherLoad())
if __name__ == "__main__":
manager.run()
davidism commented
You don't. uWSGI doesn't care about the manager, it just cares about loading the WSGI entry point (the Flask app).
davidism commented
If you need to pass in arguments, use environment variables or local config files.