Commit 248bc9f5 authored by Klaus Wölfel's avatar Klaus Wölfel

append data to some data streams immediately

parent 7f7867c7
......@@ -62,6 +62,11 @@ class DataStream(BigFile):
def appendData(self, data_chunk):
db = self.getPortalObject().erp5_sql_connection()
if self.getId() in ('150', '152', '154', '156'):
if not db.query('SELECT 1 FROM data_stream_queue WHERE uid=%s'
% self.getUid(), max_rows=1)[1]:
BigFile.appendData(self, data_chunk)
return
db.query('INSERT INTO data_stream_queue(uid, chunk) VALUES(%s,%s)'
% (self.getUid(), db.string_literal(data_chunk)))
......
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