mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-10 17:16:22 +01:00
Change celery tasks to shared task decorator
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
from allianceauth.celery import app
|
||||
from celery import shared_task
|
||||
from allianceauth.corputils import CorpStats
|
||||
|
||||
|
||||
@app.task
|
||||
@shared_task
|
||||
def update_corpstats(pk):
|
||||
cs = CorpStats.objects.get(pk=pk)
|
||||
cs.update()
|
||||
|
||||
|
||||
@app.task
|
||||
@shared_task
|
||||
def update_all_corpstats():
|
||||
for cs in CorpStats.objects.all():
|
||||
update_corpstats.delay(cs.pk)
|
||||
|
||||
Reference in New Issue
Block a user