Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FS-SC
AsapoWorker
Commits
736c3578
Commit
736c3578
authored
May 17, 2021
by
Mikhail Karnevskiy
Browse files
Catch exception by acknowledging
parent
6e5c4ef3
Pipeline
#6435
passed with stage
in 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/AsapoWorker/asapo_receiver.py
View file @
736c3578
...
...
@@ -120,9 +120,13 @@ class SimpleAsapoReceiver:
def
acknowledge
(
self
,
name
,
ids
):
for
ack_id
in
ids
:
group_id
=
str
(
binascii
.
crc32
(
name
.
encode
()))
log
.
info
(
"Acknowledging id=%s stream=%s group_id=%s"
,
ack_id
,
self
.
stream
,
group_id
)
self
.
consumer
.
acknowledge
(
group_id
,
ack_id
,
stream
=
self
.
stream
)
try
:
group_id
=
str
(
binascii
.
crc32
(
name
.
encode
()))
log
.
info
(
"Acknowledging id=%s stream=%s group_id=%s"
,
ack_id
,
self
.
stream
,
group_id
)
self
.
consumer
.
acknowledge
(
group_id
,
ack_id
,
stream
=
self
.
stream
)
except
Exception
as
e
:
log
.
warning
(
"Acknowledging of id=%s stream=%s group_id=%s fails. Reason=%s"
,
ack_id
,
self
.
stream
,
group_id
,
e
)
def
get_unacknowledged_messages
(
self
,
group_id
,
stream
):
try
:
...
...
Write
Preview
Supports
Markdown
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!
Cancel
Please
register
or
sign in
to comment