Skip to content

Commit 3d518ff

Browse files
committed
optimised fetching from drill meta
1 parent 6d5c01d commit 3d518ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/scripts/expire-data/delete_custom_events_regex.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ Promise.all([pluginManager.dbConnection("countly"), pluginManager.dbConnection("
5555
{
5656
'app_id': app._id + "",
5757
"type": "e",
58-
"e": {$regex: regex, $options: CASE_INSENSITIVE ? "i" : ""}
58+
"e": {$regex: regex, $options: CASE_INSENSITIVE ? "i" : "", $nin: events}
5959
},
6060
{ _id: 0, e: 1}
6161
).toArray();
62-
events = [...new Set(events.concat(metaEvents.map(e => e.e)))];
62+
events = events.concat(metaEvents.map(e => e.e));
6363
}
6464
catch (err) {
6565
close("Invalid regex");

0 commit comments

Comments
 (0)