Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
siibra-explorer
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiao Gui
siibra-explorer
Commits
f668de29
Commit
f668de29
authored
1 year ago
by
Xiao Gui
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev' into staging
parents
3ea0ceb9
1ddedbbd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
backend/app/app.py
+16
-0
16 additions, 0 deletions
backend/app/app.py
backend/app/config.py
+1
-1
1 addition, 1 deletion
backend/app/config.py
backend/app/plugin.py
+2
-2
2 additions, 2 deletions
backend/app/plugin.py
with
19 additions
and
3 deletions
backend/app/app.py
+
16
−
0
View file @
f668de29
...
...
@@ -59,3 +59,19 @@ if HOST_PATHNAME:
app
.
mount
(
HOST_PATHNAME
,
_app
)
ready_flag
=
True
DO_NOT_LOGS
=
(
"
/ready
"
,
"
/metrics
"
,
)
import
logging
class
EndpointLoggingFilter
(
logging
.
Filter
):
"""
Custom logger filter. Do not log metrics, ready endpoint.
"""
def
filter
(
self
,
record
:
logging
.
LogRecord
)
->
bool
:
message
=
record
.
getMessage
()
return
all
(
message
.
find
(
do_not_log
)
==
-
1
for
do_not_log
in
DO_NOT_LOGS
)
logging
.
getLogger
(
"
uvicorn.access
"
).
addFilter
(
EndpointLoggingFilter
())
This diff is collapsed.
Click to expand it.
backend/app/config.py
+
1
−
1
View file @
f668de29
...
...
@@ -21,7 +21,7 @@ BUILD_TEXT = os.getenv("BUILD_TEXT", "")
# REDIS env var
REDIS_PROTO
=
os
.
getenv
(
"
REDIS_PROTO
"
)
REDIS_ADDR
=
os
.
getenv
(
"
REDIS_ADDR
"
)
or
os
.
getenv
(
"
REDIS_RATE_LIMITING_DB_EPHEMERAL_PORT_6379_TCP_
PROTO
"
)
or
"
localhost
"
REDIS_ADDR
=
os
.
getenv
(
"
REDIS_ADDR
"
)
or
os
.
getenv
(
"
REDIS_RATE_LIMITING_DB_EPHEMERAL_PORT_6379_TCP_
ADDR
"
)
or
"
localhost
"
REDIS_PORT
=
os
.
getenv
(
"
REDIS_PORT
"
)
or
os
.
getenv
(
"
REDIS_RATE_LIMITING_DB_EPHEMERAL_PORT_6379_TCP_PORT
"
)
or
"
6379
"
REDIS_USERNAME
=
os
.
getenv
(
"
REDIS_USERNAME
"
)
REDIS_PASSWORD
=
os
.
getenv
(
"
REDIS_PASSWORD
"
)
...
...
This diff is collapsed.
Click to expand it.
backend/app/plugin.py
+
2
−
2
View file @
f668de29
...
...
@@ -17,7 +17,7 @@ _redisstore = RedisEphStore.Persistent()
PLUGINS
:
List
[
str
]
=
[]
try
:
PLUGINS
=
[
v
v
.
strip
()
for
v
in
[
*
V2_7_PLUGIN_URLS
.
split
(
"
;
"
),
*
V2_7_STAGING_PLUGIN_URLS
.
split
(
"
;
"
)]
if
v
# remove empty strings
]
...
...
@@ -64,7 +64,7 @@ def _get_manifest(url: str):
return
return_obj
except
Exception
as
e
:
logger
.
error
(
f
"
Error retrieving:
{
url
}
"
)
logger
.
error
(
f
"
Error retrieving:
{
url
}
,
{
str
(
e
)
}
"
)
@router.get
(
"
/manifests
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment