refactor uwsgi