python - Updated code not executing on server -


i've modified .py file on production server , changes not being applied. @ first thought because associated .pyc file not being updated. deleted .pyc file , tested hoping .py file compile new .pyc file. applications behavior did not update , new .pyc file not created. done based off previous question.

how script executing without generating new .pyc file? here 2 files in question:

-rw-r--r--  1 ubuntu ubuntu  47872 jul 13 04:39 admin_email.py -rw-r--r--  1 root   root    48212 feb 10 03:12 admin_email.pyc 

admin_email.pyc has been deleted. admin_email.py remains on there server.

here code executing script has been changed:

from xxx.admin_email import send_email_admins ... g = lambda x, y, z: send_email_admins(x, y, z) ... threading.thread(target=g, args=(order_id, request.user.email, form.cleaned_data)).start() 

the application being served gunicorn + nginx.

any ideas on issue is? why new .pyc file being created? more importantly why applications behavior not being updated?

im assuming you're suing wsgi or fcgi - on apache or nginx

with wsgi - apache cache django you.

so, need tell apache/nginx/server-provider django code has changed. way changing "last edited" meta information of .wsgi file. so, simple touch /path/to/django.wsgi , work.

if use fcgi, same thing applies.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -