Merge branch 'dependencies' into 'master'

Depencies fix

Closes #1150

See merge request allianceauth/allianceauth!1127
This commit is contained in:
Basraah
2019-03-12 20:50:00 +10:00
parent fe3fe0527a
commit dec793bfac
2 changed files with 5 additions and 4 deletions

View File

@@ -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