code refine, use more uwsgi feature