我要做的是在芹菜工人中对import { componentB } from '/components'
pymongo
对象和Cursor
pymongo
对象执行一些操作。我的工人的定义如下:
Collection
这就是我调用上面定义的函数的方式:
@app.task
def find_missing_songs(cursor_object, collection_object):
# Some operation is performed on both arguments
我了解到from bson.json_util import dumps
find_missing_songs.delay(dumps(cursor_object), dumps(collection_object))
对序列化dumps
对象很有用。但是,我收到Cursor
对象的以下错误:
Collection
有没有一种方法可以TypeError: 'Collection' object is not callable. If you meant to call the 'iteritems' method on a 'Collection' object it is failing because no such method exists.
对象进行序列化?