equal
deleted
inserted
replaced
145 return False |
145 return False |
146 session.commit(free_cnxset=False) |
146 session.commit(free_cnxset=False) |
147 return True |
147 return True |
148 |
148 |
149 def release_synchronization_lock(self, session): |
149 def release_synchronization_lock(self, session): |
|
150 session.set_cnxset() |
150 session.execute('SET X synchronizing FALSE WHERE X eid %(x)s', |
151 session.execute('SET X synchronizing FALSE WHERE X eid %(x)s', |
151 {'x': self.eid}) |
152 {'x': self.eid}) |
152 session.commit() |
153 session.commit() |
153 |
154 |
154 def pull_data(self, session, force=False, raise_on_error=False): |
155 def pull_data(self, session, force=False, raise_on_error=False): |
274 else: |
275 else: |
275 source = self.source |
276 source = self.source |
276 sourceparams['parser'] = self |
277 sourceparams['parser'] = self |
277 try: |
278 try: |
278 eid = session.repo.extid2eid(source, str(uri), etype, session, |
279 eid = session.repo.extid2eid(source, str(uri), etype, session, |
279 complete=False, |
280 complete=False, commit=False, |
280 sourceparams=sourceparams) |
281 sourceparams=sourceparams) |
281 except ValidationError, ex: |
282 except ValidationError, ex: |
282 self.source.error('error while creating %s: %s', etype, ex) |
283 self.source.error('error while creating %s: %s', etype, ex) |
283 return None |
284 return None |
284 if eid < 0: |
285 if eid < 0: |