0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00

Updated limit service to only request a single member (#16672)

When we request all members, what happens is that the amount of data is
so great that Ghost is completely overwhelmed - database connections
are hanging open, spanners are thrown in the works, half the team are
staying up half the night!
This commit is contained in:
Fabien 'egg' O'Carroll 2023-04-19 07:20:34 +07:00 committed by GitHub
parent 16e8d7d1f4
commit bd04eb3d21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,7 +93,7 @@ export default class LimitsService extends Service {
}
async getMembersCount() {
const members = await this.store.query('member', {limit: 'all'});
const members = await this.store.query('member', {limit: 1});
const total = members.meta.pagination.total;
return total;