Commit 8d4a8450 authored by Julien Muchembled's avatar Julien Muchembled Committed by Laurent S

fixup! DataStream: queue ingested data in order to append bigger chunks

parent bb816d89
...@@ -69,6 +69,7 @@ class DataStream(BigFile): ...@@ -69,6 +69,7 @@ class DataStream(BigFile):
q = self.getPortalObject().erp5_sql_connection().query q = self.getPortalObject().erp5_sql_connection().query
r = q('SELECT id, chunk FROM data_stream_queue WHERE uid=%s ORDER BY id' r = q('SELECT id, chunk FROM data_stream_queue WHERE uid=%s ORDER BY id'
% self.getUid(), max_rows=0)[1] % self.getUid(), max_rows=0)[1]
if r:
self._appendData(''.join(x[1] for x in r)) self._appendData(''.join(x[1] for x in r))
q('DELETE FROM data_stream_queue WHERE id IN (%s)' q('DELETE FROM data_stream_queue WHERE id IN (%s)'
% ','.join(str(x[0]) for x in r)) % ','.join(str(x[0]) for x in r))
SELECT catalog.uid, path FROM data_stream_queue LEFT JOIN catalog USING (uid) SELECT DISTINCT catalog.uid, path FROM data_stream_queue LEFT JOIN catalog USING (uid)
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment