Browse Source

fix async keyword in python3.7

yangck 6 years ago
parent
commit
3cd5961a1f
3 changed files with 4 additions and 4 deletions
  1. 0 0
      celery/backends/asynchronous.py
  2. 3 3
      celery/backends/redis.py
  3. 1 1
      celery/backends/rpc.py

+ 0 - 0
celery/backends/async.py → celery/backends/asynchronous.py


+ 3 - 3
celery/backends/redis.py

@@ -19,7 +19,7 @@ from celery.utils.functional import dictfilter
 from celery.utils.log import get_logger
 from celery.utils.time import humanize_seconds
 
-from . import async, base
+from . import asynchronous, base
 
 try:
     from urllib.parse import unquote
@@ -74,7 +74,7 @@ E_LOST = 'Connection to Redis lost: Retry (%s/%s) %s.'
 logger = get_logger(__name__)
 
 
-class ResultConsumer(async.BaseResultConsumer):
+class ResultConsumer(asynchronous.BaseResultConsumer):
     _pubsub = None
 
     def __init__(self, *args, **kwargs):
@@ -138,7 +138,7 @@ class ResultConsumer(async.BaseResultConsumer):
             self._pubsub.unsubscribe(key)
 
 
-class RedisBackend(base.BaseKeyValueStoreBackend, async.AsyncBackendMixin):
+class RedisBackend(base.BaseKeyValueStoreBackend, asynchronous.AsyncBackendMixin):
     """Redis task result store."""
 
     ResultConsumer = ResultConsumer

+ 1 - 1
celery/backends/rpc.py

@@ -17,7 +17,7 @@ from celery._state import current_task, task_join_will_block
 from celery.five import items, range
 
 from . import base
-from .async import AsyncBackendMixin, BaseResultConsumer
+from .asynchronous import AsyncBackendMixin, BaseResultConsumer
 
 __all__ = ('BacklogLimitExceeded', 'RPCBackend')