celery & attributes list by product
This commit is contained in:
12
apps/authentication/tasks.py
Normal file
12
apps/authentication/tasks.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from celery import shared_task
|
||||
from apps.product.models import SaleUnit
|
||||
|
||||
|
||||
@shared_task(bind=True)
|
||||
def task_func(self):
|
||||
print("sssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss")
|
||||
sale_unit = SaleUnit.objects.get(id=1)
|
||||
print(sale_unit.unit)
|
||||
sale_unit.trash = True
|
||||
sale_unit.save()
|
||||
return 'Done'
|
||||
Reference in New Issue
Block a user