forked from celery/celery
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sendbird/PLAT-6085
Move gevent monkey.patch_all() to the top of __init__.py
- Loading branch information
Showing
1 changed file
with
12 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ | |
|
||
from __future__ import absolute_import, print_function, unicode_literals | ||
|
||
import gevent | ||
from gevent import monkey, signal as gevent_signal | ||
monkey.patch_all() | ||
|
||
import os | ||
import re | ||
import sys | ||
|
@@ -20,7 +24,7 @@ | |
|
||
SERIES = 'cliffs' | ||
|
||
__version__ = '4.4.6' | ||
__version__ = '4.4.6-gevent-enforced' | ||
__author__ = 'Ask Solem' | ||
__contact__ = '[email protected]' | ||
__homepage__ = 'http://celeryproject.org' | ||
|
@@ -113,10 +117,13 @@ def _patch_eventlet(): | |
|
||
|
||
def _patch_gevent(): | ||
import gevent | ||
from gevent import monkey, signal as gevent_signal | ||
|
||
monkey.patch_all() | ||
# Moved to the top of this file | ||
# by Tei | ||
# | ||
# import gevent | ||
# from gevent import monkey, signal as gevent_signal | ||
# | ||
# monkey.patch_all() | ||
if gevent.version_info[0] == 0: # pragma: no cover | ||
# Signals aren't working in gevent versions <1.0, | ||
# and aren't monkey patched by patch_all() | ||
|