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
Commits
2dd3b9f8
Commit
2dd3b9f8
authored
1 year ago
by
Jan Hartig
Browse files
Options
Downloads
Patches
Plain Diff
Fix metrics stuff
parent
56b9da6c
Branches
Branches containing commit
No related tags found
1 merge request
!6
Fix metrics stuff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
mailservice.py
+7
-2
7 additions, 2 deletions
mailservice.py
with
7 additions
and
2 deletions
mailservice.py
+
7
−
2
View file @
2dd3b9f8
...
@@ -107,11 +107,16 @@ def main(end):
...
@@ -107,11 +107,16 @@ def main(end):
try
:
try
:
try
:
try
:
auth
=
HTTPBasicAuth
(
config
[
"
METRICS
"
][
"
USER
"
],
config
[
"
M
ONITORING
"
][
"
PASS
"
])
auth
=
HTTPBasicAuth
(
config
[
"
METRICS
"
][
"
USER
"
],
config
[
"
M
ETRICS
"
][
"
PASS
"
])
except
KeyError
:
except
KeyError
:
auth
=
None
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
:
except
KeyError
:
pass
pass
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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