Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
MetaGer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
56
Issues
56
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
open-source
MetaGer
Commits
e328a7e3
Commit
e328a7e3
authored
Nov 05, 2018
by
Dominik Hebeler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The old humanverification entries now get deleted by the laravel scheduler
parent
cc9d0051
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
app/Console/Kernel.php
app/Console/Kernel.php
+7
-0
No files found.
app/Console/Kernel.php
View file @
e328a7e3
...
...
@@ -2,6 +2,7 @@
namespace
App\Console
;
use
DB
;
use
Illuminate\Console\Scheduling\Schedule
;
use
Illuminate\Foundation\Console\Kernel
as
ConsoleKernel
;
...
...
@@ -25,6 +26,12 @@ class Kernel extends ConsoleKernel
protected
function
schedule
(
Schedule
$schedule
)
{
$schedule
->
command
(
'log:rotate'
)
->
everyTenMinutes
();
// Delete all of the old humanverification entries
$schedule
->
call
(
function
()
{
DB
::
delete
(
'DELETE FROM humanverification WHERE updated_at < (now() - interval 72 hour) AND whitelist = 0 ORDER BY updated_at DESC'
);
DB
::
delete
(
'DELETE FROM humanverification WHERE updated_at < (now() - interval 2 week) AND whitelist = 1 ORDER BY updated_at DESC'
);
})
->
everyThirtyMinutes
();
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment