* Added randomization for the creation time of the DiscrdUser.
All checks were successful
Build docker image / build_docker_image (push) Successful in 4m54s
All checks were successful
Build docker image / build_docker_image (push) Successful in 4m54s
This commit is contained in:
@@ -21,8 +21,8 @@ class DiscordUserSeeder extends Seeder
|
|||||||
|
|
||||||
// Creating Discord Users
|
// Creating Discord Users
|
||||||
$discordUsers = DiscordUser::factory()->times($discordUserCount)->make(
|
$discordUsers = DiscordUser::factory()->times($discordUserCount)->make(
|
||||||
//TODO? maybe add sum random creation times here ex.:->subSeconds(rand(0, 30 * 24 * 60 * 60))
|
['created_at' => Carbon::now()
|
||||||
['created_at' => Carbon::now()]
|
->subSeconds(rand(0, 30 * 24 * 60 * 60))] // randomize to the last 30 days
|
||||||
);
|
);
|
||||||
|
|
||||||
// Saving Discord Users
|
// Saving Discord Users
|
||||||
@@ -46,6 +46,7 @@ class DiscordUserSeeder extends Seeder
|
|||||||
'discord_user_id' => $discordUser->id,
|
'discord_user_id' => $discordUser->id,
|
||||||
'created_at' => Carbon::now(),
|
'created_at' => Carbon::now(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// add remainder to buffer
|
// add remainder to buffer
|
||||||
$remainders = $remainders->concat($discordUserRemainders);
|
$remainders = $remainders->concat($discordUserRemainders);
|
||||||
if ($remainders->count() >= $chunkSize) {
|
if ($remainders->count() >= $chunkSize) {
|
||||||
|
|||||||
Reference in New Issue
Block a user