Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add prune command #2571

Merged
merged 2 commits into from
Apr 18, 2023
Merged

feat: add prune command #2571

merged 2 commits into from
Apr 18, 2023

Conversation

maloun96
Copy link
Contributor

No description provided.

Comment on lines 608 to 618
$query = static::query()
->with('logs')
->where('created_at', '<', $before);

$totalDeleted = 0;

do {
$deleted = $query->take(1000)->delete();

$totalDeleted += $deleted;
} while ($deleted !== 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is gonna delete from the mails scheduler not from Logs. This logic should be in the MailatorLogs table.

@binaryk binaryk merged commit 2fa7d2f into BinarCode:master Apr 18, 2023
@binaryk
Copy link
Contributor

binaryk commented Apr 18, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants