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
cd64dd93
Commit
cd64dd93
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
py3
parent
35878952
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
coolamqp/clustering/cluster.py
+4
-5
4 additions, 5 deletions
coolamqp/clustering/cluster.py
coolamqp/framing/compilation/content_property.py
+2
-2
2 additions, 2 deletions
coolamqp/framing/compilation/content_property.py
with
6 additions
and
7 deletions
coolamqp/clustering/cluster.py
+
4
−
5
View file @
cd64dd93
...
...
@@ -92,18 +92,17 @@ class Cluster(object):
:param tx: Whether to publish it transactionally.
If you choose so, you will receive a Future that can be used
to check it broker took responsibility for this message.
Note that if tx if False, and message cannot be delivered to broker at once,
it will be discarded.
:return: Future or None
"""
publisher
=
(
self
.
pub_tr
if
tx
else
self
.
pub_na
)
if
isinstance
(
exchange
,
Exchange
):
exchange
=
exchange
.
name
try
:
return
publisher
.
publish
(
message
,
exchange
.
encode
(
'
utf8
'
),
routing_key
.
encode
(
'
utf8
'
))
return
(
self
.
pub_tr
if
tx
else
self
.
pub_na
)
.
publish
(
message
,
exchange
.
encode
(
'
utf8
'
),
routing_key
.
encode
(
'
utf8
'
))
except
Publisher
.
UnusablePublisher
:
raise
NotImplementedError
(
u
'
Sorry, this functionality i
f
not yet implemented!
'
)
raise
NotImplementedError
(
u
'
Sorry, this functionality i
s
not yet implemented!
'
)
def
start
(
self
,
wait
=
True
):
...
...
This diff is collapsed.
Click to expand it.
coolamqp/framing/compilation/content_property.py
+
2
−
2
View file @
cd64dd93
...
...
@@ -89,8 +89,8 @@ def _compile_particular_content_property_list_class(zpf, fields):
mod
.
append
(
u
'
\n
def write_to(self, buf):
\n
'
)
mod
.
append
(
u
'
buf.write(
'
)
repred_zpf
=
repr
(
zpf
)
if
not
zpf
.
startswith
(
b
'
b
'
):
repred_zpf
=
'
b
'
+
repred_zpf
if
not
zpf
.
startswith
(
u
'
b
'
):
repred_zpf
=
u
'
b
'
+
repred_zpf
mod
.
append
(
repred_zpf
)
mod
.
append
(
u
'
)
\n
'
)
...
...
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