Skip to content

Commit

Permalink
Merge pull request #1 from sendbird/PLAT-6085
Browse files Browse the repository at this point in the history
Move gevent monkey.patch_all() to the top of __init__.py
  • Loading branch information
ImTei authored Aug 11, 2020
2 parents ea96475 + 8e2ccde commit 6a193c0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 6a193c0

Please sign in to comment.