Skip to content

Commit f1cfe7d

Browse files
author
Cookiezaurs
committed
fxes
1 parent a02b185 commit f1cfe7d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

api/parts/queries/mongodbQueries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ var obb = {};
194194
//Union with data from view updates and group by _id.sg
195195
var match2 = JSON.parse(JSON.stringify(match));
196196
match2.e = "[CLY]_view_update";
197-
pipeline2 = [
197+
var pipeline2 = [
198198
{"$match": match2},
199199
{"$group": {"_id": {"u": "$uid", "sg": "$n"}, "t": {"$sum": 0}, "d": {"$sum": "$dur"}, "s": {"$sum": 0}, "e": {"$sum": "$sg.exit"}, "b": {"$sum": "$sg.bounce"}, "scr": {"$sum": 0}, "u": {"$sum": 1}}}, //t and scr are 0 as they are not tracked in view update
200200
{"$group": {"_id": "$_id.sg", "u": {"$sum": "$u"}, "t": {"$sum": "$t"}, "d": {"$sum": "$d"}, "s": {"$sum": "$s"}, "e": {"$sum": "$e"}, "b": {"$sum": "$b"}, "scr": {"$sum": "$scr"}}}

bin/scripts/data-cleanup/remove_old_crashes_sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Promise.all(
4646
pluginManager.dbConnection("countly"),
4747
pluginManager.dbConnection("countly_drill")
4848
])
49-
.spread(async function(db, drillDb) {
49+
.then(async function([db, drillDb]) {
5050
try {
5151
const apps = (APP_ID.length) ? [{_id: APP_ID}] : await db.collection('apps').find({}, { _id: 1 }).toArray();
5252

bin/scripts/data-cleanup/remove_old_drill_meta_collections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Promise.all(
99
pluginManager.dbConnection("countly"),
1010
pluginManager.dbConnection("countly_drill")
1111
])
12-
.spread(async function(countlyDB, countlyDrillDB) {
12+
.then(async function([countlyDB, countlyDrillDB]) {
1313

1414
countlyDrillDB.collections(function(err, colls) {
1515
if (err) {

bin/scripts/modify-data/delete/delete_user_properties.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ var unset = {};
2222
unset[PROPERTY] = "";
2323

2424
var Promise = require("bluebird");
25-
Promise.all([plugins.dbConnection("countly"), plugins.dbConnection("countly_drill")]).spread(function(db, dbDrill) {
25+
Promise.all([plugins.dbConnection("countly"), plugins.dbConnection("countly_drill")]).then(async function([db, dbDrill]) {
2626
console.log("Deleting property from app users");
2727
db.collection('app_users' + APP_ID).updateMany({}, {$unset: unset}, function(err,) {
2828
if (err) {

0 commit comments

Comments
 (0)