Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
26630e47
Commit
26630e47
authored
1 year ago
by
Thomas Kluyver
Browse files
Options
Downloads
Patches
Plain Diff
Webservice: Update Kafka config to use EuXFEL broker
parent
943f4522
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!951
Webservice: Update Kafka config to use EuXFEL broker
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
webservice/config/webservice.yaml
+8
-5
8 additions, 5 deletions
webservice/config/webservice.yaml
webservice/job_monitor.py
+1
-1
1 addition, 1 deletion
webservice/job_monitor.py
with
9 additions
and
6 deletions
webservice/config/webservice.yaml
+
8
−
5
View file @
26630e47
...
@@ -23,11 +23,14 @@ metadata-client:
...
@@ -23,11 +23,14 @@ metadata-client:
base-api-url
:
"
https://in.xfel.eu/metadata/api/"
base-api-url
:
"
https://in.xfel.eu/metadata/api/"
kafka
:
kafka
:
brokers
:
producer-config
:
-
it-kafka-broker01.desy.de
bootstrap-servers
:
-
it-kafka-broker02.desy.de
-
"
exflwgs06.desy.de"
-
it-kafka-broker03.desy.de
security_protocol
:
"
SASL_PLAINTEXT"
topic
:
xfel-test-offline-cal
sasl_mechanism
:
"
PLAIN"
sasl_plain_username
:
"
cal"
# sasl_plain_password: # Configure per-user
topic
:
cal.offline-corrections
correct
:
correct
:
in-folder
:
/gpfs/exfel/exp/{instrument}/{cycle}/p{proposal}/raw
in-folder
:
/gpfs/exfel/exp/{instrument}/{cycle}/p{proposal}/raw
...
...
This diff is collapsed.
Click to expand it.
webservice/job_monitor.py
+
1
−
1
View file @
26630e47
...
@@ -44,9 +44,9 @@ class NoOpProducer:
...
@@ -44,9 +44,9 @@ class NoOpProducer:
def
init_kafka_producer
(
config
):
def
init_kafka_producer
(
config
):
try
:
try
:
return
KafkaProducer
(
return
KafkaProducer
(
bootstrap_servers
=
config
[
'
kafka
'
][
'
brokers
'
],
value_serializer
=
lambda
d
:
json
.
dumps
(
d
).
encode
(
'
utf-8
'
),
value_serializer
=
lambda
d
:
json
.
dumps
(
d
).
encode
(
'
utf-8
'
),
max_block_ms
=
2000
,
# Don't get stuck trying to send Kafka messages
max_block_ms
=
2000
,
# Don't get stuck trying to send Kafka messages
**
config
[
'
kafka
'
][
'
producer-config
'
]
)
)
except
KafkaError
:
except
KafkaError
:
log
.
warning
(
"
Problem initialising Kafka producer;
"
log
.
warning
(
"
Problem initialising Kafka producer;
"
...
...
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