python - How do I update my flask API code deployed over uWSGI and Nginx on ubuntu? -
i followed guide set api here: https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-uwsgi-and-nginx-on-ubuntu-14-04
it works great , can make queries against api succesfully. issue want tweak flask app/api different things , add functionality api pinging seems old one, despite having updated flask .py file on server ssh. tried going through steps in tutorial got working in hopes of refreshing code accesses nothing seems work. of these commands tried are:
sudo nginx -t sudo service nginx restart how can , ping updated flask .py file?
as per nos's suggestion tried:
restart myproject but gave following error:
restart: rejected send message, 1 matched rules; type="method_call", sender=":1.8" (uid=1000 pid=2596 comm="restart thonapi ") interface="com.ubuntu.upstart0_6.job" member="restart" error name="(unset)" requested_reply="0" destination="com.ubuntu.upstart" (uid=0 pid=1 comm="/sbin/init ")
you restarting nginx not uwsgi. nginx proxy server routing requests wsgi app. when change in config of nginx these commands work. when changes in wsgi app have restart service of uwsgi.
you restart service following commands. depends init system service using
if service uses systemd system.
sudo systemctl restart myproject
else if uses upstart script.
sudo restart myproject
if fails can use or if don't know init system being used:
sudo service restart myproject
Comments
Post a Comment