Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
ptb-subtitle-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Hartig
ptb-subtitle-service
Merge requests
!6
Fix metrics stuff
Code
Änderungen prüfen
Branch auschecken
Herunterladen
Patches
Unformatierter Diff
Merged
Fix metrics stuff
dev
into
main
Overview
0
Commits
2
Pipelines
1
Changes
1
Merged
Jan Hartig
requested to merge
dev
into
main
1 year ago
Overview
0
Commits
2
Pipelines
1
Changes
1
Expand
0
0
Merge request reports
Compare
main
main (base)
and
latest version
latest version
c7144e4d
2 commits,
1 year ago
1 file
+
7
−
2
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
mailservice.py
+
7
−
2
Options
@@ -107,11 +107,16 @@ def main(end):
try
:
try
:
auth
=
HTTPBasicAuth
(
config
[
"
METRICS
"
][
"
USER
"
],
config
[
"
M
ONITORING
"
][
"
PASS
"
])
auth
=
HTTPBasicAuth
(
config
[
"
METRICS
"
][
"
USER
"
],
config
[
"
M
ETRICS
"
][
"
PASS
"
])
except
KeyError
:
auth
=
None
requests
.
post
(
config
[
"
METRICS
"
][
"
URL
"
],
json
=
metrics
,
auth
=
auth
)
r
=
requests
.
post
(
config
[
"
METRICS
"
][
"
URL
"
],
json
=
metrics
,
auth
=
auth
)
try
:
r
.
raise_for_status
()
except
requests
.
HTTPError
as
e
:
print
(
"
[MAILSERVICE] Could not send metrics to server: {}
"
.
format
(
e
))
except
KeyError
:
pass
Loading