Skip to content

Commit

Permalink
Merge branch 'feature/xxx-celery-52' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mpasternak committed Jul 11, 2022
2 parents bc857c7 + 0d75eea commit 77b28d8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 53 deletions.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ dev
* użycie model_bakery zamiast model_mommy (b/n),
* aktualizuj listę charakterów w multiwyszukiwarce na bieżąco (#647),
* obsługa PostgreSQL 14 (#1243),
* aktualizacja biblioteki Celery do 5.2.2 (b/n),

202207.1087
-----------
Expand Down
133 changes: 83 additions & 50 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ django-autoslug = "1.9.8"
django-autocomplete-light = "3.9.4"
django-admin-tools = "0.9.0"
xlrd = "2.0.1"
celery = {version = "4.4.7", extras = ["redis"]}
celery = {version = "5.2.2", extras = ["redis"]}
django-celery-results = "2.0.1"
django-tables2 = "2.3.1"
django-sendfile = "0.3.11"
Expand Down
5 changes: 3 additions & 2 deletions src/ewaluacja2021/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from os.path import basename
from tempfile import mkdtemp

import celery
import denorm
from django.core.files import File
from django.core.management import call_command
Expand All @@ -15,6 +14,8 @@

from bpp.models import Patent_Autor, Wydawnictwo_Ciagle_Autor, Wydawnictwo_Zwarte_Autor

from django_bpp import celery_tasks


def suma_odpietych_dyscyplin():
return (
Expand Down Expand Up @@ -58,7 +59,7 @@ def przywroc_przypiecia(odpiete_przed, odpiete_po):
klass.objects.filter(pk__in=po.difference(przed)).update(przypieta=True)


@celery.task
@celery_tasks.app.task
def generuj_algorytm(pk, *args, **kw):
zamowienie = ZamowienieNaRaport.objects.get(pk=pk)
zamowienie.uid_zadania = generuj_algorytm.request.id
Expand Down

0 comments on commit 77b28d8

Please sign in to comment.