Django and Celery: unable to pickle task
thanks in advance :)
I have this async Celery task call:
update_solr.delay(obj, context)
where obj is a Django model called Clip and context is a Python dict.
My task definition looks like:
@task
def update_solr(obj, context):
clip_serializer = SOLRClipSerializer(obj, context=context)
response = requests.post(url, data=clip_serializer.data)
where clip_serializer.data is a dict and url is a string representing a url.
When I try to call update_solr.delay(), I get this error:
PicklingError: Can't pickle <type 'instancemethod'>: attribute lookup
__builtin__.instancemethod failed
Neither of the args to the task are instance methods so I'm confused.
No comments:
Post a Comment