mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 04:20:17 +02:00
Change celery tasks to shared task decorator
This commit is contained in:
parent
676e68a2bb
commit
f037d7fea6
@ -2,14 +2,14 @@ import logging
|
|||||||
|
|
||||||
from esi.errors import TokenExpiredError, TokenInvalidError
|
from esi.errors import TokenExpiredError, TokenInvalidError
|
||||||
from esi.models import Token
|
from esi.models import Token
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.authentication.models import CharacterOwnership
|
from allianceauth.authentication.models import CharacterOwnership
|
||||||
from allianceauth.celery import app
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def check_character_ownership(owner_hash):
|
def check_character_ownership(owner_hash):
|
||||||
tokens = Token.objects.filter(character_owner_hash=owner_hash)
|
tokens = Token.objects.filter(character_owner_hash=owner_hash)
|
||||||
if tokens:
|
if tokens:
|
||||||
@ -31,7 +31,7 @@ def check_character_ownership(owner_hash):
|
|||||||
CharacterOwnership.objects.filter(owner_hash=owner_hash).delete()
|
CharacterOwnership.objects.filter(owner_hash=owner_hash).delete()
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def check_all_character_ownership():
|
def check_all_character_ownership():
|
||||||
for c in CharacterOwnership.objects.all().only('owner_hash'):
|
for c in CharacterOwnership.objects.all().only('owner_hash'):
|
||||||
check_character_ownership.delay(c.owner_hash)
|
check_character_ownership.delay(c.owner_hash)
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
from allianceauth.celery import app
|
from celery import shared_task
|
||||||
from allianceauth.corputils import CorpStats
|
from allianceauth.corputils import CorpStats
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def update_corpstats(pk):
|
def update_corpstats(pk):
|
||||||
cs = CorpStats.objects.get(pk=pk)
|
cs = CorpStats.objects.get(pk=pk)
|
||||||
cs.update()
|
cs.update()
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def update_all_corpstats():
|
def update_all_corpstats():
|
||||||
for cs in CorpStats.objects.all():
|
for cs in CorpStats.objects.all():
|
||||||
update_corpstats.delay(cs.pk)
|
update_corpstats.delay(cs.pk)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
from allianceauth.celery import app
|
from celery import shared_task
|
||||||
from .models import EveAllianceInfo
|
from .models import EveAllianceInfo
|
||||||
from .models import EveCharacter
|
from .models import EveCharacter
|
||||||
from .models import EveCorporationInfo
|
from .models import EveCorporationInfo
|
||||||
@ -8,22 +8,22 @@ from .models import EveCorporationInfo
|
|||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def update_corp(corp_id):
|
def update_corp(corp_id):
|
||||||
EveCorporationInfo.objects.update_corporation(corp_id)
|
EveCorporationInfo.objects.update_corporation(corp_id)
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def update_alliance(alliance_id):
|
def update_alliance(alliance_id):
|
||||||
EveAllianceInfo.objects.update_alliance(alliance_id).populate_alliance()
|
EveAllianceInfo.objects.update_alliance(alliance_id).populate_alliance()
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def update_character(character_id):
|
def update_character(character_id):
|
||||||
EveCharacter.objects.update_character(character_id)
|
EveCharacter.objects.update_character(character_id)
|
||||||
|
|
||||||
|
|
||||||
@app.task
|
@shared_task
|
||||||
def run_model_update():
|
def run_model_update():
|
||||||
# update existing corp models
|
# update existing corp models
|
||||||
for corp in EveCorporationInfo.objects.all().values('corporation_id'):
|
for corp in EveCorporationInfo.objects.all().values('corporation_id'):
|
||||||
|
@ -4,8 +4,8 @@ from django.conf import settings
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import DiscordOAuthManager, DiscordApiBackoff
|
from .manager import DiscordOAuthManager, DiscordApiBackoff
|
||||||
from .models import DiscordUser
|
from .models import DiscordUser
|
||||||
@ -57,7 +57,7 @@ class DiscordTasks:
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name='discord.update_groups')
|
@shared_task(bind=True, name='discord.update_groups')
|
||||||
def update_groups(task_self, pk):
|
def update_groups(task_self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating discord groups for user %s" % user)
|
logger.debug("Updating discord groups for user %s" % user)
|
||||||
@ -87,14 +87,14 @@ class DiscordTasks:
|
|||||||
logger.debug("User does not have a discord account, skipping")
|
logger.debug("User does not have a discord account, skipping")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name='discord.update_all_groups')
|
@shared_task(name='discord.update_all_groups')
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL discord groups")
|
logger.debug("Updating ALL discord groups")
|
||||||
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
||||||
DiscordTasks.update_groups.delay(discord_user.user.pk)
|
DiscordTasks.update_groups.delay(discord_user.user.pk)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name='discord.update_nickname')
|
@shared_task(bind=True, name='discord.update_nickname')
|
||||||
def update_nickname(self, pk):
|
def update_nickname(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating discord nickname for user %s" % user)
|
logger.debug("Updating discord nickname for user %s" % user)
|
||||||
@ -118,7 +118,7 @@ class DiscordTasks:
|
|||||||
logger.debug("User %s does not have a discord account" % user)
|
logger.debug("User %s does not have a discord account" % user)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name='discord.update_all_nicknames')
|
@shared_task(name='discord.update_all_nicknames')
|
||||||
def update_all_nicknames():
|
def update_all_nicknames():
|
||||||
logger.debug("Updating ALL discord nicknames")
|
logger.debug("Updating ALL discord nicknames")
|
||||||
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
for discord_user in DiscordUser.objects.exclude(uid__exact=''):
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import DiscourseManager
|
from .manager import DiscourseManager
|
||||||
@ -40,7 +40,7 @@ class DiscourseTasks:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name='discourse.update_groups')
|
@shared_task(bind=True, name='discourse.update_groups')
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating discourse groups for user %s" % user)
|
logger.debug("Updating discourse groups for user %s" % user)
|
||||||
@ -52,7 +52,7 @@ class DiscourseTasks:
|
|||||||
logger.debug("Updated user %s discourse groups." % user)
|
logger.debug("Updated user %s discourse groups." % user)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name='discourse.update_all_groups')
|
@shared_task(name='discourse.update_all_groups')
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL discourse groups")
|
logger.debug("Updating ALL discourse groups")
|
||||||
for discourse_user in DiscourseUser.objects.filter(enabled=True):
|
for discourse_user in DiscourseUser.objects.filter(enabled=True):
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from .models import MumbleUser
|
from .models import MumbleUser
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -26,7 +26,7 @@ class MumbleTasks:
|
|||||||
MumbleUser.objects.all().delete()
|
MumbleUser.objects.all().delete()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name="mumble.update_groups")
|
@shared_task(bind=True, name="mumble.update_groups")
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating mumble groups for user %s" % user)
|
logger.debug("Updating mumble groups for user %s" % user)
|
||||||
@ -46,7 +46,7 @@ class MumbleTasks:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name="mumble.update_all_groups")
|
@shared_task(name="mumble.update_all_groups")
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL mumble groups")
|
logger.debug("Updating ALL mumble groups")
|
||||||
for mumble_user in MumbleUser.objects.exclude(username__exact=''):
|
for mumble_user in MumbleUser.objects.exclude(username__exact=''):
|
||||||
|
@ -3,8 +3,8 @@ import logging
|
|||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.services.modules.openfire.manager import OpenfireManager
|
from allianceauth.services.modules.openfire.manager import OpenfireManager
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .models import OpenfireUser
|
from .models import OpenfireUser
|
||||||
@ -40,7 +40,7 @@ class OpenfireTasks:
|
|||||||
OpenfireUser.objects.all().delete()
|
OpenfireUser.objects.all().delete()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name="openfire.update_groups")
|
@shared_task(bind=True, name="openfire.update_groups")
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating jabber groups for user %s" % user)
|
logger.debug("Updating jabber groups for user %s" % user)
|
||||||
@ -61,7 +61,7 @@ class OpenfireTasks:
|
|||||||
logger.debug("User does not have an openfire account")
|
logger.debug("User does not have an openfire account")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name="openfire.update_all_groups")
|
@shared_task(name="openfire.update_all_groups")
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL jabber groups")
|
logger.debug("Updating ALL jabber groups")
|
||||||
for openfire_user in OpenfireUser.objects.exclude(username__exact=''):
|
for openfire_user in OpenfireUser.objects.exclude(username__exact=''):
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import Phpbb3Manager
|
from .manager import Phpbb3Manager
|
||||||
@ -35,7 +35,7 @@ class Phpbb3Tasks:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name="phpbb3.update_groups")
|
@shared_task(bind=True, name="phpbb3.update_groups")
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating phpbb3 groups for user %s" % user)
|
logger.debug("Updating phpbb3 groups for user %s" % user)
|
||||||
@ -56,7 +56,7 @@ class Phpbb3Tasks:
|
|||||||
logger.debug("User does not have a Phpbb3 account")
|
logger.debug("User does not have a Phpbb3 account")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name="phpbb3.update_all_groups")
|
@shared_task(name="phpbb3.update_all_groups")
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL phpbb3 groups")
|
logger.debug("Updating ALL phpbb3 groups")
|
||||||
for user in Phpbb3User.objects.exclude(username__exact=''):
|
for user in Phpbb3User.objects.exclude(username__exact=''):
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import SeatManager
|
from .manager import SeatManager
|
||||||
@ -34,7 +34,7 @@ class SeatTasks:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True)
|
@shared_task(bind=True)
|
||||||
def update_roles(self, pk):
|
def update_roles(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating SeAT roles for user %s" % user)
|
logger.debug("Updating SeAT roles for user %s" % user)
|
||||||
@ -56,7 +56,7 @@ class SeatTasks:
|
|||||||
logger.debug("User %s does not have a SeAT account")
|
logger.debug("User %s does not have a SeAT account")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task
|
@shared_task
|
||||||
def update_all_roles():
|
def update_all_roles():
|
||||||
logger.debug("Updating ALL SeAT roles")
|
logger.debug("Updating ALL SeAT roles")
|
||||||
for user in SeatUser.objects.all():
|
for user in SeatUser.objects.all():
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import SmfManager
|
from .manager import SmfManager
|
||||||
@ -39,7 +39,7 @@ class SmfTasks:
|
|||||||
SmfUser.objects.all().delete()
|
SmfUser.objects.all().delete()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name="smf.update_groups")
|
@shared_task(bind=True, name="smf.update_groups")
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating smf groups for user %s" % user)
|
logger.debug("Updating smf groups for user %s" % user)
|
||||||
@ -60,7 +60,7 @@ class SmfTasks:
|
|||||||
logger.debug("User does not have an smf account")
|
logger.debug("User does not have an smf account")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name="smf.update_all_groups")
|
@shared_task(name="smf.update_all_groups")
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL smf groups")
|
logger.debug("Updating ALL smf groups")
|
||||||
for user in SmfUser.objects.exclude(username__exact=''):
|
for user in SmfUser.objects.exclude(username__exact=''):
|
||||||
|
@ -2,8 +2,8 @@ import logging
|
|||||||
|
|
||||||
from django.contrib.auth.models import User
|
from django.contrib.auth.models import User
|
||||||
from django.core.exceptions import ObjectDoesNotExist
|
from django.core.exceptions import ObjectDoesNotExist
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from allianceauth.notifications import notify
|
from allianceauth.notifications import notify
|
||||||
from allianceauth.services.hooks import NameFormatter
|
from allianceauth.services.hooks import NameFormatter
|
||||||
from .manager import Teamspeak3Manager
|
from .manager import Teamspeak3Manager
|
||||||
@ -37,7 +37,7 @@ class Teamspeak3Tasks:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task()
|
@shared_task
|
||||||
def run_ts3_group_update():
|
def run_ts3_group_update():
|
||||||
logger.debug("TS3 installed. Syncing local group objects.")
|
logger.debug("TS3 installed. Syncing local group objects.")
|
||||||
with Teamspeak3Manager() as ts3man:
|
with Teamspeak3Manager() as ts3man:
|
||||||
@ -56,7 +56,7 @@ class Teamspeak3Tasks:
|
|||||||
logger.info("Teamspeak3 disabled")
|
logger.info("Teamspeak3 disabled")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(bind=True, name="teamspeak3.update_groups")
|
@shared_task(bind=True, name="teamspeak3.update_groups")
|
||||||
def update_groups(self, pk):
|
def update_groups(self, pk):
|
||||||
user = User.objects.get(pk=pk)
|
user = User.objects.get(pk=pk)
|
||||||
logger.debug("Updating user %s teamspeak3 groups" % user)
|
logger.debug("Updating user %s teamspeak3 groups" % user)
|
||||||
@ -81,7 +81,7 @@ class Teamspeak3Tasks:
|
|||||||
logger.debug("User does not have a teamspeak3 account")
|
logger.debug("User does not have a teamspeak3 account")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@app.task(name="teamspeak3.update_all_groups")
|
@shared_task(name="teamspeak3.update_all_groups")
|
||||||
def update_all_groups():
|
def update_all_groups():
|
||||||
logger.debug("Updating ALL teamspeak3 groups")
|
logger.debug("Updating ALL teamspeak3 groups")
|
||||||
for user in Teamspeak3User.objects.exclude(uid__exact=''):
|
for user in Teamspeak3User.objects.exclude(uid__exact=''):
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import redis
|
import redis
|
||||||
|
from celery import shared_task
|
||||||
|
|
||||||
from allianceauth.celery import app
|
|
||||||
from .hooks import ServicesHook
|
from .hooks import ServicesHook
|
||||||
|
|
||||||
REDIS_CLIENT = redis.Redis()
|
REDIS_CLIENT = redis.Redis()
|
||||||
@ -37,7 +37,7 @@ def only_one(function=None, key="", timeout=None):
|
|||||||
return _dec(function) if function is not None else _dec
|
return _dec(function) if function is not None else _dec
|
||||||
|
|
||||||
|
|
||||||
@app.task(bind=True)
|
@shared_task(bind=True)
|
||||||
def validate_services(self, user):
|
def validate_services(self, user):
|
||||||
logger.debug('Ensuring user {} has permissions for active services'.format(user))
|
logger.debug('Ensuring user {} has permissions for active services'.format(user))
|
||||||
# Iterate through services hooks and have them check the validity of the user
|
# Iterate through services hooks and have them check the validity of the user
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
from .celery import app as celery_app
|
||||||
|
|
||||||
|
__all__ = ['celery_app']
|
@ -1,12 +1,12 @@
|
|||||||
import os
|
import os, sys
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
|
|
||||||
# set the default Django settings module for the 'celery' program.
|
# set the default Django settings module for the 'celery' program.
|
||||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'allianceauth.project_template.project_name.settings.base')
|
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings')
|
||||||
|
|
||||||
from django.conf import settings # noqa
|
from django.conf import settings # noqa
|
||||||
|
|
||||||
app = Celery('alliance_auth')
|
app = Celery('devauth')
|
||||||
|
|
||||||
# Using a string here means the worker don't have to serialize
|
# Using a string here means the worker don't have to serialize
|
||||||
# the configuration object to child processes.
|
# the configuration object to child processes.
|
Loading…
x
Reference in New Issue
Block a user