chatgpt大模型
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
891 B

  1. """
  2. WSGI config for Zhijian_Project_WebService project.
  3. It exposes the WSGI callable as a module-level variable named ``application``.
  4. For more information on this file, see
  5. https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/
  6. """
  7. import os
  8. import threading
  9. from text_analysis.views import chatgpt,zk_monitoring
  10. # t = threading.Thread(target=chatgpt, name='chatgpt')
  11. # t.daemon = True
  12. # t.start()
  13. # 启动 5 个 chatgpt 线程
  14. num_threads = 5
  15. chatgpt_threads = [threading.Thread(target=chatgpt) for _ in range(num_threads)]
  16. for thread in chatgpt_threads:
  17. thread.daemon = True
  18. thread.start()
  19. #启动zk监听线程
  20. t = threading.Thread(target=zk_monitoring, name='zk_monitoring')
  21. t.daemon = True
  22. t.start()
  23. from django.core.wsgi import get_wsgi_application
  24. os.environ.setdefault("DJANGO_SETTINGS_MODULE", "text_analysis.settings")
  25. application = get_wsgi_application()