[datafeed] remove remaining uses of 'synchronizing' attribute replaced by 'in_synchronization' in 3.13.8. Closes #1989131
--- a/server/sources/datafeed.py Tue Oct 11 13:50:32 2011 +0200
+++ b/server/sources/datafeed.py Tue Oct 11 13:54:17 2011 +0200
@@ -149,10 +149,10 @@
# XXX race condition until WHERE of SET queries is executed using
# 'SELECT FOR UPDATE'
now = datetime.utcnow()
- if not session.execute('SET X in_synchronizaton %(now)s WHERE X eid %(x)s, X synchronizing NULL OR X synchronizing < %(maxdt)s',
- {'x': self.eid,
- 'now': now,
- 'maxdt': now - self.max_lock_lifetime}):
+ if not session.execute(
+ 'SET X in_synchronization %(now)s WHERE X eid %(x)s, '
+ 'X in_synchronization NULL OR X in_synchronization < %(maxdt)s',
+ {'x': self.eid, 'now': now, 'maxdt': now - self.max_lock_lifetime}):
self.error('concurrent synchronization detected, skip pull')
session.commit(free_cnxset=False)
return False
@@ -161,7 +161,7 @@
def release_synchronization_lock(self, session):
session.set_cnxset()
- session.execute('SET X synchronizing None WHERE X eid %(x)s',
+ session.execute('SET X in_synchronization NULL WHERE X eid %(x)s',
{'x': self.eid})
session.commit()