You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
268 B

from celery import Celery
app = Celery('tasks', broker='redis://localhost:6379/0')
@app.task
def return_dtys(dtys_id):
from .models import DTYSModel
DTYSModel.objects.filter(id=dtys_id, is_ordered=False)\
.update(is_stopped=False, price_stopped=0)