Skip to content

Commit

Permalink
Revert: testing just top downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
levinmr committed Feb 21, 2025
1 parent 928b48c commit 3bcc61b
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 1 deletion.
7 changes: 7 additions & 0 deletions deploy/publisher.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ const Bree = require("bree");
const bree = new Bree({
logger,
jobs: [
{
name: "daily",
timeout: "1",
interval: "at 10:02 am",
},
/*
// Runs `../jobs/realtime.js` 1 millisecond after the process starts and
// then every 15 minutes going forward.
{
Expand Down Expand Up @@ -41,6 +47,7 @@ const bree = new Bree({
timeout: "3m",
interval: "at 10:03 am",
},
*/
],
});

Expand Down
2 changes: 1 addition & 1 deletion jobs/daily.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
process.env.ANALYTICS_REPORTS_PATH = "reports/usa.json";
process.env.ANALYTICS_REPORTS_PATH = "reports/test.json";
process.env.ANALYTICS_SCRIPT_NAME = "daily.js";

const { runQueuePublish } = require("../index.js");
Expand Down
80 changes: 80 additions & 0 deletions reports/test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"reports": [
{
"name": "top-downloads",
"frequency": "daily",
"dateRanges": [
"yesterday",
"7-days",
"30-days",
"90-days",
"current-year",
"current-fiscal-year",
"previous-year",
"previous-fiscal-year"
],
"dateRangeChunkSize": 1,
"query": {
"dimensions": [
{
"name": "pageTitle"
},
{
"name": "fullPageUrl"
},
{
"name": "linkUrl"
}
],
"metrics": [
{
"name": "eventCount"
}
],
"orderBys": [
{
"metric": {
"metricName": "eventCount"
},
"desc": true
}
],
"dimensionFilter": {
"filter": {
"fieldName": "eventName",
"stringFilter": {
"value": "file_download",
"caseSensitive": false
}
},
"andGroup": {
"expressions": [
{
"notExpression": {
"filter": {
"fieldName": "pageTitle",
"inListFilter": {
"values": [
"(other)",
"other",
"(not set)",
"null",
""
],
"caseSensitive": false
}
}
}
}
]
}
},
"limit": "100"
},
"meta": {
"name": "Top Downloads",
"description": "Top 100 downloads"
}
}
]
}

0 comments on commit 3bcc61b

Please sign in to comment.