refactored uwsgi_get_app_id