Nginx - Seems to be running old python scripts
<p>I have a website (panicselect.com), and I have made some changes to the python code which i pushed onto Github and then pulled onto my server, which seems to be successful. I have tried restarting the server, but it still seems to be running my older version of the code even though I have successfully pulled the new version. I believe this as some 'champions' are still missing and the rating seems to be calculated the old way, which is in contrast to what is on my localhost. Do you have an idea of what this could be? I'm running Ubuntu Linux on Digital Ocean with sendfile off and nginx uses Uwsgi to run the Py code.</p>

<p>To fully determine how to deploy changes to your production server, you must understand 2 things:</p>

<h1>1. Most WSGI servers (including uWSGI) will load code on start, not on each execution.</h1>

<p>That means, changes in your code won't be reflected immediately, because old code is still loaded into your WSGI server. It differs from PHP execution, where code is reloaded on every request. That means, you must restart your WSGI server when you want your new code to be loaded.</p>

<h1>2. WSGI and nginx are NOT related</h1>

<p>Yes, nginx will connect your WSGI server to outside world, but that's it! It doesn't manage your WSGI server. That means, you must restart your WSGI server by hand. Restarting nginx won't cause that.</p>

<p>Also it is good to note here: restarting nginx is not required, unless you've changed nginx configuration.</p>

python git nginx github uwsgi