old_contents: import os
  import gevent.socket
  import redis.connection
  from manage import _set_source_root_parent, _set_source_root
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
  
  _set_source_root_parent('submodules')
  _set_source_root(os.path.join('corehq', 'ex-submodules'))
  _set_source_root(os.path.join('custom', '_legacy'))
  
  redis.connection.socket = gevent.socket
  from ws4redis.uwsgi_runserver import uWSGIWebsocketServer
  application = uWSGIWebsocketServer()
  
new_contents: import os
  import gevent.socket
  import redis.connection
  from manage import init_hq_python_path, run_patches
  
  os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
  
  init_hq_python_path()
  run_patches()
  
  redis.connection.socket = gevent.socket
  from ws4redis.uwsgi_runserver import uWSGIWebsocketServer
  application = uWSGIWebsocketServer()
  
subject: Fix websockets process after celery upgrade