QChris has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/154268

Change subject: Document faked 'created' timestamps for recurring reports
......................................................................

Document faked 'created' timestamps for recurring reports

Change-Id: Iaf0b213c8626a6d2e9c41a1c4825e8264b4a4398
---
M wikimetrics/models/report_nodes/run_report.py
1 file changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/wikimetrics 
refs/changes/68/154268/1

diff --git a/wikimetrics/models/report_nodes/run_report.py 
b/wikimetrics/models/report_nodes/run_report.py
index bde84dc..781db87 100644
--- a/wikimetrics/models/report_nodes/run_report.py
+++ b/wikimetrics/models/report_nodes/run_report.py
@@ -46,7 +46,18 @@
                 public          : whether to expose results publicly
             user_id             : the user wishing to run this report
             recurrent_parent_id : the parent ReportStore.id for a recurrent run
-            created             : if set, represents the date of a recurrent 
run
+            created             : if set, represents the date of a recurrent 
run.
+                                  This need not be the timestamp when the
+                                  recurrent run has been created -- for example
+                                  when backfilling. Hence, this does not fully
+                                  match the semantics of the word 'created'.
+                                  But since neither start nor end date have a
+                                  separate column in the report table in the
+                                  database, the covered period for backfilled
+                                  recurring reports would be hard to identify
+                                  when only looking at the raw database
+                                  tables. To overcome this issue, we abuse the
+                                  created date here.
 
         Raises:
             KeyError if required parameters are missing
@@ -189,7 +200,8 @@
                     parameters,
                     user_id=report.user_id,
                     recurrent_parent_id=report.id,
-                    created=day,
+                    created=day,  # See constructor of RunReport why we do not
+                    # use now() for created
                 )
                 reports_created += 1
             except Exception, e:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf0b213c8626a6d2e9c41a1c4825e8264b4a4398
Gerrit-PatchSet: 1
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to