Skip to content

Commit

Permalink
Merge pull request #1463 from Bidaya0/feat/add-gevent-option
Browse files Browse the repository at this point in the history
feat: optimise agent upload.
  • Loading branch information
Bidaya0 authored May 24, 2023
2 parents 78147ad + fdc3b0f commit a9a3802
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dongtai_conf/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
https://docs.djangoproject.com/en/3.0/ref/settings/
"""

import os
from typing import List
from ast import literal_eval
from urllib.parse import urljoin
import os
import sys
from configparser import ConfigParser

Expand Down
5 changes: 5 additions & 0 deletions dongtai_conf/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@

import os

ENABLE_GEVENT = os.environ.get("GEVENT", 'FALSE') == 'TRUE'
if ENABLE_GEVENT:
from gevent import monkey
monkey.patch_all()

from django.core.wsgi import get_wsgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dongtai_conf.settings')
Expand Down

0 comments on commit a9a3802

Please sign in to comment.