I want to be able to connect to an already running instance of a flask application inside ubuntu terminal. I've tried flask-script and click, but the problem is when I execute the "flask shell" command, it starts a new instance of the application and I'm unable to use the already running instance, any idea?
Asked
Active
Viewed 139 times
0
-
Could you elaborate on what you mean by `connecting`? – dmigo Oct 15 '19 at 15:21
-
Why do you need to connect to already running flask instance. Also, how are you running that flask instance? uwsgi? – Sujan Adiga Oct 15 '19 at 16:10
-
@dmigo I mean the ability to execute different services of the running application in the flask shell. to be able to do stuffs like reloading configs and more. – Mohamad Nobakht Oct 16 '19 at 07:50
-
@SujanAdiga yeah, it's behind uwsgi in production. – Mohamad Nobakht Oct 16 '19 at 07:51
-
You can explore --pyshell option in uwsgi. – Sujan Adiga Oct 16 '19 at 15:07