Explorar o código

fix async keyword in python3.7

yangck %!s(int64=6) %!d(string=hai) anos
pai
achega
3cd5961a1f
Modificáronse 3 ficheiros con 4 adicións e 4 borrados
  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')