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
50643b0f
Commit
50643b0f
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
v0.89
parent
d235129e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+2
-3
2 additions, 3 deletions
README.md
coolamqp/objects.py
+12
-2
12 additions, 2 deletions
coolamqp/objects.py
with
14 additions
and
5 deletions
README.md
+
2
−
3
View file @
50643b0f
...
...
@@ -62,7 +62,6 @@ if you need every CPU cycle you can get.
*
Consumer being cancelled with a CCN
*
v0.88:
*
**API changes:**
*
Cluster.start will RuntimeError if called more than once
*
Cluster.shutdown will RuntimeError if called without .start
*
Cluster.start will RuntimeError if called more than once
*
Cluster.shutdown will RuntimeError if called without .start
*
Warning with content list is shorter
This diff is collapsed.
Click to expand it.
coolamqp/objects.py
+
12
−
2
View file @
50643b0f
...
...
@@ -72,7 +72,8 @@ class Message(object):
self
.
properties
=
properties
LAMBDA_NONE
=
lambda
:
None
def
LAMBDA_NONE
():
pass
class
ReceivedMessage
(
Message
):
...
...
@@ -125,7 +126,16 @@ class Exchange(object):
direct
=
None
# the direct exchange
def
__init__
(
self
,
name
=
u
''
,
type
=
b
'
direct
'
,
durable
=
True
,
auto_delete
=
False
):
"""
:type name: unicode is preferred, binary type will get decoded to unicode with utf8
:param type: exchange type. Please pass a binary type.
"""
if
isinstance
(
name
,
six
.
binary_type
):
name
=
name
.
decode
(
'
utf8
'
)
self
.
name
=
name
if
isinstance
(
type
,
six
.
text_type
):
type
=
type
.
encode
(
'
utf8
'
)
warnings
.
warn
(
u
'
type should be a binary type
'
)
...
...
@@ -135,7 +145,7 @@ class Exchange(object):
def
__repr__
(
self
):
return
u
'
Exchange(%s, %s, %s, %s)
'
%
(
repr
(
self
.
name
),
repr
(
self
.
type
),
repr
(
self
.
durable
),
repr
(
self
.
auto_delete
))
repr
(
self
.
name
),
repr
(
self
.
type
),
repr
(
self
.
durable
),
repr
(
self
.
auto_delete
))
def
__hash__
(
self
):
return
self
.
name
.
__hash__
()
...
...
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