diff --git a/allianceauth/services/tasks.py b/allianceauth/services/tasks.py index 9803a4d1..6db9d6e8 100644 --- a/allianceauth/services/tasks.py +++ b/allianceauth/services/tasks.py @@ -4,8 +4,8 @@ from celery import shared_task from django.contrib.auth.models import User from .hooks import ServicesHook from celery_once import QueueOnce as BaseTask, AlreadyQueued -from celery_once.helpers import now_unix from django.core.cache import cache +from time import time logger = logging.getLogger(__name__) @@ -22,7 +22,7 @@ class DjangoBackend: @staticmethod def raise_or_lock(key, timeout): - now = now_unix() + now = int(time()) result = cache.get(key) if result: remaining = int(result) - now diff --git a/setup.py b/setup.py index 9d9bd219..6c68d71b 100644 --- a/setup.py +++ b/setup.py @@ -13,20 +13,21 @@ install_requires = [ 'semantic_version', 'redis<=2.10.6', - 'celery>=4.0.2', + 'celery>=4.0.2,<4.3.0', 'celery_once', 'django>=2.0', 'django-bootstrap-form', 'django-registration==2.4', 'django-sortedm2m', - 'django-redis-cache>=1.7.1', + 'django-redis-cache==1.8.1', 'django-celery-beat<=1.1.1', 'openfire-restapi', 'sleekxmpp', 'adarnauth-esi>=1.4.10,<2.0', + 'kombu<=4.3.0', ] testing_extras = [