我正在尝试使用google.appengine.ext.deferred来运行一个Task。我正在将一个方法传递给defer()方法,该方法成功运行,但返回后会抛出ValueError:
File ".../admin.py", line 73, in post
result = deferred.defer(meeple_tasks.buildGames())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/ext/deferred/deferred.py", line 198, in _curry_callable
raise ValueError("obj must be callable")
ValueError: obj must be callable
以下是我称之为defer的地方:
result = deferred.defer(meeple_tasks.buildGames())
buildGames()将在完成时返回True。