mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-10 04:50:16 +02:00
15 lines
298 B
Python
15 lines
298 B
Python
from celery import shared_task
|
|
from allianceauth.corputils.models import CorpStats
|
|
|
|
|
|
@shared_task
|
|
def update_corpstats(pk):
|
|
cs = CorpStats.objects.get(pk=pk)
|
|
cs.update()
|
|
|
|
|
|
@shared_task
|
|
def update_all_corpstats():
|
|
for cs in CorpStats.objects.all():
|
|
update_corpstats.delay(cs.pk)
|