タスクキューに長時間実行されているプロセスがあり、タスクに10分以上かかる可能性があるため、DeadlineExceededErrorが発生しています。この質問で説明したように、長時間実行されるプロセスには、kmlファイルの作成に使用される大きなディクショナリの新しい値を順番に計算するforループがあります。現在、タスクは次のようになっています。
class longprocess_handler(webapp2.RequestHandler):
def post(self):
#This is currently one task that recursively uses data in dictionaries to
#produce kml files every few minutes
for j in range(0, Time):
# Processes data from dictionaries sequentially in this for loop
# Sends message to client to request the data.
プロセスを次のようないくつかの小さなタスクにしたいと思います。
class longprocess_handler(webapp2.RequestHandler):
def post(self):
for j in range(0, Time):
# Send dictionaries to smaller task
CallSmallerTask_handler(dictionaries)
# Receive dictionaries back from task. (How do I do this?)
# Repeat for loop with new dictionaries to call next task.
前のタスクの結果を使用して順次作成される小さなタスクのループを作成できるように、タスクからデータを取得する方法はありますか?前のタスクの辞書をデータストアに保存してから取得し、次のタスクを作成する必要がありますか?(辞書が非常に大きいので、これを避けたいと思っています。難しいかもしれません)。