new task bug fixed

This commit is contained in:
aliqandil 2024-10-24 21:23:08 +03:30
parent f0e02c3c5f
commit 37cdb1675d
2 changed files with 4 additions and 2 deletions

View File

@ -107,7 +107,9 @@ class AsyncronWorker:
from .models import Task from .models import Task
for func in Task.registered_tasks.values(): for func in Task.registered_tasks.values():
task = func.task task = func.task
if not task.pk: task.pk = Task.objects.get( name = task.name ).pk if not task.pk:
try: task.pk = Task.objects.get( name = task.name ).pk
except Task.DoesNotExist: pass #It's a new one, it's fine.
self.attach_django_signals() self.attach_django_signals()

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup( setup(
name='asyncron', name='asyncron',
version='0.1.2', version='0.1.3',
packages=find_packages(), packages=find_packages(),
#include_package_data=True, # Include static files from MANIFEST.in #include_package_data=True, # Include static files from MANIFEST.in
install_requires=[ install_requires=[