I am trying do some multiprocessing in a scheduler job. This is web2py trunk from about ten days ago.
Things in current don't seem to be inherited by the spawn process (this is on windows) So I thought I'd learn about exec_environment to see if I can set up the DAL in a python process. exec_environment is failing at this line in db.py auth = Auth(db,cas_provider=...) in tools.py __init__ line 1263 which is request=current.request the exception is AttributeError: 'thread._local' object has no attribute 'request' why I am trying this? I have a nightly scheduled task which does a three phase data update. The third phase can be easily made to run in parallel. But it is dependent on the first two phases, and I don't know how to handle this in the scheduler (otherwise I could assign multiple workers to the scheduler and simply schedule lots of jobs). So I want to use a process pool. I pass around a reference to a DAL database in current, and this is not working in the spawned processes, hence I was hoping that exec_environment would help. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.