开发者

Can we run multiprocessing Pool in GAE?

开发者 https://www.devze.com 2023-03-16 21:16 出处:网络
Is it possible to run multiprocessing Pool in gae? If yes, how come my code runs fine in my local machine but pops out the following err msg with django remote api:

Is it possible to run multiprocessing Pool in gae?

If yes, how come my code runs fine in my local machine but pops out the following err msg with django remote api:

File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/pool.py", line 148, in map
    return self.map_async(func, iterable, chunksize).get()   
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/pool.py", l开发者_运维技巧ine 422, in get
    raise self._value TypeError: __init__() keywords must be strings


You won't be able to run multiprocessing on the production servers, but if you are using the remote_api, then you can run your script locally (with multiprocessing) and have each Pool process use communicate with the production server via remote_api calls.

If you need multiprocess style actions actually in server-side code, then the Mapper API is perfect for this task.

0

精彩评论

暂无评论...
验证码 换一张
取 消