server/sources/datafeed.py
changeset 7398 26695dd703d8
parent 7385 29f050e39b09
child 7399 972ed1843bd8
equal deleted inserted replaced
7397:6a9e66d788b3 7398:26695dd703d8
   252         error = False
   252         error = False
   253         for args in self.parse(url):
   253         for args in self.parse(url):
   254             try:
   254             try:
   255                 self.process_item(*args)
   255                 self.process_item(*args)
   256                 if partialcommit:
   256                 if partialcommit:
   257                     # commit+set_pool instead of commit(reset_pool=False) to let
   257                     # commit+set_cnxset instead of commit(free_cnxset=False) to let
   258                     # other a chance to get our pool
   258                     # other a chance to get our connections set
   259                     self._cw.commit()
   259                     self._cw.commit()
   260                     self._cw.set_pool()
   260                     self._cw.set_cnxset()
   261             except ValidationError, exc:
   261             except ValidationError, exc:
   262                 if raise_on_error:
   262                 if raise_on_error:
   263                     raise
   263                     raise
   264                 if partialcommit:
   264                 if partialcommit:
   265                     self.source.error('Skipping %s because of validation error %s' % (args, exc))
   265                     self.source.error('Skipping %s because of validation error %s' % (args, exc))
   266                     self._cw.rollback()
   266                     self._cw.rollback()
   267                     self._cw.set_pool()
   267                     self._cw.set_cnxset()
   268                     error = True
   268                     error = True
   269                 else:
   269                 else:
   270                     raise
   270                     raise
   271         return error
   271         return error
   272 
   272