* Added randomization for the creation time of the DiscrdUser.
All checks were successful
Build docker image / build_docker_image (push) Successful in 4m54s

This commit is contained in:
2025-05-12 11:01:21 +02:00
parent c88975d48f
commit 7ab505ae26

View File

@@ -21,8 +21,8 @@ class DiscordUserSeeder extends Seeder
// Creating Discord Users
$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
@@ -46,6 +46,7 @@ class DiscordUserSeeder extends Seeder
'discord_user_id' => $discordUser->id,
'created_at' => Carbon::now(),
]);
// add remainder to buffer
$remainders = $remainders->concat($discordUserRemainders);
if ($remainders->count() >= $chunkSize) {