Commit b33663dd authored by Julien Muchembled's avatar Julien Muchembled Committed by Eteri

WWM Mic Wind: do not delay ingestion for some turbines

parent 8bd2c0a5
...@@ -62,7 +62,11 @@ class DataStream(BigFile): ...@@ -62,7 +62,11 @@ class DataStream(BigFile):
def appendData(self, data_chunk): def appendData(self, data_chunk):
db = self.getPortalObject().erp5_sql_connection() db = self.getPortalObject().erp5_sql_connection()
if self.getId() in ('150', '152', '154', '156'): if self.getId() in ('150', '152', '154', '156', '989', '59'):
# 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' if not db.query('SELECT 1 FROM data_stream_queue WHERE uid=%s'
% self.getUid(), max_rows=1)[1]: % self.getUid(), max_rows=1)[1]:
BigFile.appendData(self, data_chunk) 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