mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Update celery tasks to new style & remove djcelery Vanilla celery + django-celery-beat take over the role of djcelery. Task schedules are consolidated into settings instead of residing in code. Update docs and example supervisor configs.
15 lines
288 B
Python
15 lines
288 B
Python
from corputils.models import CorpStats
|
|
from alliance_auth.celeryapp import app
|
|
|
|
|
|
@app.task
|
|
def update_corpstats(pk):
|
|
cs = CorpStats.objects.get(pk=pk)
|
|
cs.update()
|
|
|
|
|
|
@app.task
|
|
def update_all_corpstats():
|
|
for cs in CorpStats.objects.all():
|
|
update_corpstats.delay(cs.pk)
|