Django/Celery task received but nothing happened
Im trying to update database object via celery task. without celery task im able to update the db object but when i add .delay() and send it to celery task ive got
Task passenger.tasks.create_circle[3e60c0ee-6da7-4e7c-80c8-663b27b90762] received
child process 116 calling self.run()
child process 5952 calling self.run()
and then nothing happened.I cant update the db object whatsoever.
here is my settings.py
BROKER_URL = 'redis://localhost:6379'
CELERY_ACCEPT_CONTENT = ['application/json']
CELERY_TASK_SERIALIZER = 'json'
CELERY_RESULT_SERIALIZER = 'json'
and here is the tasks.py
@shared_task(bind=True)
def create_circle(self, userid):
print('celery working')
radius = 500
user = Passenger.objects.get(id = userid)
point = user.location
point.transform(6347)
poly = point.buffer(radius)
poly.transform(4326)
user.circle = poly
user.save()
any idea?