Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Письменов Дмитрий Иванович
/
yourroomads
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b5fb4a88
authored
Jun 23, 2021
by
Vladislav
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove clockworck cache in schedule
1 parent
d2a9fc28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
app/Console/Kernel.php
app/Console/Kernel.php
View file @
b5fb4a8
...
...
@@ -24,6 +24,7 @@ use App\Console\Commands\KeywordsDelete;
use
App\Console\Commands\KeywordsUpdate
;
use
App\Console\Commands\RefreshLimits
;
use
Illuminate\Console\Scheduling\Schedule
;
use
Illuminate\Filesystem\Filesystem
;
use
Illuminate\Foundation\Console\Kernel
as
ConsoleKernel
;
class
Kernel
extends
ConsoleKernel
...
...
@@ -72,6 +73,15 @@ class Kernel extends ConsoleKernel
$schedule
->
command
(
AdvertisementsAdd
::
class
)
->
hourlyAt
(
50
);
$schedule
->
command
(
AdvertisementsUpdate
::
class
)
->
hourlyAt
(
50
);
$schedule
->
call
(
function
()
{
$items
=
new
\FilesystemIterator
(
config
(
'clockwork.storage_files_path'
));
foreach
(
$items
as
$item
)
{
if
(
$item
->
getFilename
()
!==
'.gitignore'
)
{
echo
@
unlink
(
$item
->
getPathname
())
.
PHP_EOL
;
}
}
})
->
saturdays
()
->
at
(
'00:00'
);
}
/**
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment