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

Reduced number of login events in large-scale data generation

no issue

This should massively increase the speed of importing for the large dataset, which is important as the time to import it on Pro is >10 minutes at the moment
This commit is contained in:
Sam Lord 2023-02-16 20:54:14 +00:00
parent 9bd2b8c708
commit b4c90bf07d

View file

@ -50,7 +50,8 @@ const defaultQuantities = {
min: 7000,
max: 8000
}),
membersLoginEvents: 100,
// This will generate n * <members> events, is not worth being very high
membersLoginEvents: 5,
posts: () => faker.datatype.number({
min: 80,
max: 120
@ -96,7 +97,7 @@ class DataGenerator {
await transaction(table).del().whereNot('id', '1');
continue;
}
await transaction.raw(`delete from ${table}`);
await transaction(table).del();
}
this.logger.info('Finished clearing database');
}