new threads are automatically creating new connections. how to make sub-processes do the same? thanks
On Fri, Feb 5, 2010 at 12:38 PM, kevin <[email protected]> wrote: > any idea how to create new connection for new processes? > > > http://stackoverflow.com/questions/2209560/internalerror-current-transaction-is-aborted-commands-ignored-until-end-of-tran/2209958#2209958 > > thanks > > > On Thu, Feb 4, 2010 at 11:21 AM, kevin <[email protected]> wrote: > >> i am getting this when i am using web.database in a sub process using >> multiprocessing library. >> >> Process Process-15: >> Traceback (most recent call last): >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", >> line 232, in _bootstrap >> self.run() >> File >> "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/multiprocessing/process.py", >> line 88, in run >> self._target(*self._args, **self._kwargs) >> File "/Users/kevin/work/common/utils.py", line 254, in newfunc >> return func(*a, **kw) >> File "/Users/kevin/work/twitapps/twit.py", line 4609, in keeprunning >> self.__init__(self.id) >> File "/Users/kevin/work/twitapps/twit.py", line 4420, in __init__ >> row = db.query('select * from users where >> id=$id',vars=locals()).list() >> File "/Users/kevin/work/common/web/db.py", line 603, in query >> self._db_execute(db_cursor, sql_query) >> File "/Users/kevin/work/common/web/db.py", line 554, in _db_execute >> out = cur.execute(sql_query.query(paramstyle), sql_query.values()) >> >> >> how to fix this? >> thanks >> >> >> > -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
