[POS-commit] r5335 - stoqlib/trunk/stoqlib/database
Johan Dahlin
jdahlin at async.com.br
Sat Nov 11 16:40:08 BRST 2006
Author: jdahlin
Date: Sat Nov 11 16:40:08 2006
New Revision: 5335
Modified:
stoqlib/trunk/stoqlib/database/synchronization.py
Log:
Send in a station instead of station_id to TableSerializer
Modified: stoqlib/trunk/stoqlib/database/synchronization.py
==============================================================================
--- stoqlib/trunk/stoqlib/database/synchronization.py (original)
+++ stoqlib/trunk/stoqlib/database/synchronization.py Sat Nov 11 16:40:08 2006
@@ -106,10 +106,10 @@
return tables
class TableSerializer:
- def __init__(self, conn, tables, station_id):
+ def __init__(self, conn, tables, station):
self._conn = conn
self._tables = tables
- self._station_id = station_id
+ self._station = station
def _serialize_update(self, obj):
values = []
@@ -159,7 +159,7 @@
def get_chunks(self, timestamp):
data = ""
- station_id = self._station_id
+ station_id = self._station.id
for table in self._tables:
if table == TransactionEntry:
continue
@@ -550,7 +550,7 @@
# Send over all the changes from the source to the target
tables = get_tables(policy, (SyncPolicy.FROM_TARGET,
SyncPolicy.INITIAL))
- ts = TableSerializer(trans, tables, station.id)
+ ts = TableSerializer(trans, tables, station)
self._sql_send(ts.get_chunks(last_sync))
More information about the POS-commit
mailing list