Milimetric has submitted this change and it was merged.
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, 13 insertions(+), 2 deletions(-)
Approvals:
Milimetric: Looks good to me, approved
diff --git a/wikimetrics/models/report_nodes/run_report.py
b/wikimetrics/models/report_nodes/run_report.py
index bde84dc..9c0212b 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,7 @@
parameters,
user_id=report.user_id,
recurrent_parent_id=report.id,
- created=day,
+ created=day, # See constructor of RunReport
)
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: merged
Gerrit-Change-Id: Iaf0b213c8626a6d2e9c41a1c4825e8264b4a4398
Gerrit-PatchSet: 2
Gerrit-Project: analytics/wikimetrics
Gerrit-Branch: master
Gerrit-Owner: QChris <[email protected]>
Gerrit-Reviewer: Milimetric <[email protected]>
Gerrit-Reviewer: Nuria <[email protected]>
Gerrit-Reviewer: QChris <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits