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:
parent
9bd2b8c708
commit
b4c90bf07d
1 changed files with 3 additions and 2 deletions
|
@ -50,7 +50,8 @@ const defaultQuantities = {
|
||||||
min: 7000,
|
min: 7000,
|
||||||
max: 8000
|
max: 8000
|
||||||
}),
|
}),
|
||||||
membersLoginEvents: 100,
|
// This will generate n * <members> events, is not worth being very high
|
||||||
|
membersLoginEvents: 5,
|
||||||
posts: () => faker.datatype.number({
|
posts: () => faker.datatype.number({
|
||||||
min: 80,
|
min: 80,
|
||||||
max: 120
|
max: 120
|
||||||
|
@ -96,7 +97,7 @@ class DataGenerator {
|
||||||
await transaction(table).del().whereNot('id', '1');
|
await transaction(table).del().whereNot('id', '1');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
await transaction.raw(`delete from ${table}`);
|
await transaction(table).del();
|
||||||
}
|
}
|
||||||
this.logger.info('Finished clearing database');
|
this.logger.info('Finished clearing database');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue