Milimetric has submitted this change and it was merged.

Change subject: Rewrite null rows
......................................................................


Rewrite null rows

If a row has been cached where all values are empty suspect something
went wrong and attempt to rewrite them.

This should help backfill our EventLogging graphs.

Change-Id: I12c88c8c14133ecbec0d57698479d8008c36c7b4
---
M generate.py
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Milimetric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/generate.py b/generate.py
index cf4e419..a5e1b75 100644
--- a/generate.py
+++ b/generate.py
@@ -192,8 +192,9 @@
                 for row in reader:
                     # skip header
                     if csv_header:
-                        # store in cache
-                        cache[row[0]] = row[1:]
+                        # store in cache only if the row is full or something 
other than null values
+                        if not all([not a for a in row[1:]]):
+                            cache[row[0]] = row[1:]
                     else:
                         csv_header = row
         except IOError:

-- 
To view, visit https://gerrit.wikimedia.org/r/131547
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I12c88c8c14133ecbec0d57698479d8008c36c7b4
Gerrit-PatchSet: 2
Gerrit-Project: analytics/limn-mobile-data
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: JGonera <jgon...@wikimedia.org>
Gerrit-Reviewer: Jdlrobson <jrob...@wikimedia.org>
Gerrit-Reviewer: Kaldari <rkald...@wikimedia.org>
Gerrit-Reviewer: Milimetric <dandree...@wikimedia.org>
Gerrit-Reviewer: Nuria <nu...@wikimedia.org>
Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to