Commit a00a9e5b authored by Julien Muchembled's avatar Julien Muchembled Committed by Ivan Tyagov

WWM Mic Wind: do not delay ingestion for some turbines

parent 8bd2c0a5
......@@ -63,6 +63,10 @@ class DataStream(BigFile):
def appendData(self, data_chunk):
db = self.getPortalObject().erp5_sql_connection()
if self.getId() in ('150', '152', '154', '156'):
# WARNING: This precaution is not enough because there can still be a
# race condition between a zope using the old code and another
# using the new code, when the table does not contain any data
# yet for this stream.
if not db.query('SELECT 1 FROM data_stream_queue WHERE uid=%s'
% self.getUid(), max_rows=1)[1]:
BigFile.appendData(self, 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