Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
MetaGer
Commits
01361885
Commit
01361885
authored
May 14, 2022
by
Dominik Hebeler
Browse files
Merge branch 'development' into 1184-update-laravel-to-9-x
parents
bdac4802
fecfcaf8
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
chart/templates/deployment.yaml
View file @
01361885
...
...
@@ -31,6 +31,9 @@ spec:
-
name
:
secrets
secret
:
secretName
:
{{
template "secret_name" .
}}
-
name
:
mglogs-persistent-storage
persistentVolumeClaim
:
claimName
:
mg-logs
-
name
:
redis-config
configMap
:
name
:
{{
include "chart.fullname" .
}}
-redis-container-config
...
...
@@ -74,6 +77,9 @@ spec:
-
name
:
secrets
mountPath
:
/metager/metager_app/database/seeds/UsersSeeder.php
subPath
:
USERSEEDER
-
name
:
mglogs-persistent-storage
mountPath
:
/metager/metager_app/storage/logs/metager
readOnly
:
false
ports
:
-
name
:
http
containerPort
:
8080
...
...
@@ -111,6 +117,9 @@ spec:
mountPath
:
/metager/metager_app/.env
subPath
:
ENV_PRODUCTION
readOnly
:
true
-
name
:
mglogs-persistent-storage
mountPath
:
/metager/metager_app/storage/logs/metager
readOnly
:
false
ports
:
-
name
:
http
containerPort
:
8080
...
...
metager/app/Console/Commands/AppendLogs.php
View file @
01361885
...
...
@@ -54,17 +54,19 @@ class AppendLogs extends Command
}
$elements
=
[];
$elementCount
=
$redis
->
llen
(
\
App\Console\Commands\AppendLogs
::
LOGKEY
);
$elements
=
$redis
->
lpop
(
\
App\Console\Commands\AppendLogs
::
LOGKEY
,
$elementCount
);
if
(
!
is_array
(
$elements
)
||
sizeof
(
$elements
)
<=
0
)
{
return
;
while
((
$value
=
$redis
->
lpop
(
\
App\Console\Commands\AppendLogs
::
LOGKEY
))
!==
false
){
$elements
[]
=
$value
;
}
if
(
file_put_contents
(
\
App\MetaGer
::
getMGLogFile
(),
implode
(
PHP_EOL
,
$elements
)
.
PHP_EOL
,
FILE_APPEND
)
===
false
)
{
$this
->
error
(
"Konnte Log Zeile(n) nicht schreiben"
);
$redis
->
lpush
(
\
App\Console\Commands\AppendLogs
::
LOGKEY
,
array_reverse
(
$elements
));
}
else
{
$this
->
info
(
"Added "
.
sizeof
(
$elements
)
.
" lines to todays log!"
);
$this
->
error
(
"Konnte "
.
sizeof
(
$elements
)
.
" Log Zeile(n) nicht schreiben"
);
foreach
(
$elements
as
$element
){
$redis
->
lPush
(
\
App\Console\Commands\AppendLogs
::
LOGKEY
,
$element
);
}
}
else
{
$this
->
info
(
"Added "
.
sizeof
(
$elements
)
.
" lines to todays log! "
.
\
App\MetaGer
::
getMGLogFile
());
}
}
}
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