(core) Convert site metric strings to ints

Summary:
Counts were being sent as strings to the Elasticsearch instance because the
SQL queries were returning strings for the aggregate columns instead of
integers.

Test Plan: N/A

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D3859
This commit is contained in:
George Gevoian 2023-04-12 10:58:43 -04:00
parent c5029af4e7
commit 900859854c

View File

@ -165,9 +165,9 @@ export class Housekeeper {
siteType: summary.site_type,
inGoodStanding: summary.in_good_standing,
stripePlanId: summary.stripe_plan_id,
numDocs: summary.num_docs,
numWorkspaces: summary.num_workspaces,
numMembers: summary.num_members,
numDocs: Number(summary.num_docs),
numWorkspaces: Number(summary.num_workspaces),
numMembers: Number(summary.num_members),
lastActivity: summary.last_activity,
});
}
@ -177,9 +177,9 @@ export class Housekeeper {
telemetryManager?.logEvent('siteMembership', {
siteId: summary.site_id,
siteType: summary.site_type,
numOwners: summary.num_owners,
numEditors: summary.num_editors,
numViewers: summary.num_viewers,
numOwners: Number(summary.num_owners),
numEditors: Number(summary.num_editors),
numViewers: Number(summary.num_viewers),
});
}
});