Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coolamqp
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
coolamqp
Commits
f7d4cd45
Commit
f7d4cd45
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
changed basic.nack to basic.reject
basic.nack is RabbitMQ-only
parent
dfc84448
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
coolamqp/backends/base.py
+3
-3
3 additions, 3 deletions
coolamqp/backends/base.py
coolamqp/backends/pyamqp.py
+2
-2
2 additions, 2 deletions
coolamqp/backends/pyamqp.py
coolamqp/messages.py
+3
-0
3 additions, 0 deletions
coolamqp/messages.py
with
8 additions
and
5 deletions
coolamqp/backends/base.py
+
3
−
3
View file @
f7d4cd45
...
...
@@ -102,10 +102,10 @@ class AMQPBackend(object):
:param prefetch_count: prefetch window in terms of whole messages
"""
def
basic_
nack
(
self
,
delivery_tag
):
def
basic_
reject
(
self
,
delivery_tag
):
"""
NACK
a message
.
:param delivery_tag: delivery tag to
nack
Reject
a message
:param delivery_tag: delivery tag to
reject
"""
def
basic_publish
(
self
,
message
,
exchange
,
routing_key
):
...
...
This diff is collapsed.
Click to expand it.
coolamqp/backends/pyamqp.py
+
2
−
2
View file @
f7d4cd45
...
...
@@ -93,8 +93,8 @@ class PyAMQPBackend(AMQPBackend):
self
.
channel
.
queue_delete
(
queue
.
name
)
@translate_exceptions
def
basic_
nack
(
self
,
delivery_tag
):
self
.
channel
.
basic_
nack
(
delivery_tag
,
multiple
=
Fals
e
)
def
basic_
reject
(
self
,
delivery_tag
):
self
.
channel
.
basic_
reject
(
delivery_tag
,
Tru
e
)
@translate_exceptions
def
queue_declare
(
self
,
queue
):
...
...
This diff is collapsed.
Click to expand it.
coolamqp/messages.py
+
3
−
0
View file @
f7d4cd45
...
...
@@ -42,6 +42,9 @@ class ReceivedMessage(Message):
def
nack
(
self
,
on_completed
=
None
):
"""
Negative-acknowledge this message to the broker.
This internally results in a basic.reject
:param on_completed: callable/0 to call on acknowledged. Callable will be executed in
ClusterHandlerThread
'
s context.
"""
...
...
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