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
cecf5840
Commit
cecf5840
authored
7 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
fixes #23
parent
558e8a75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
coolamqp/attaches/publisher.py
+14
-16
14 additions, 16 deletions
coolamqp/attaches/publisher.py
with
14 additions
and
16 deletions
coolamqp/attaches/publisher.py
+
14
−
16
View file @
cecf5840
...
@@ -151,6 +151,7 @@ class Publisher(Channeler, Synchronized):
...
@@ -151,6 +151,7 @@ class Publisher(Channeler, Synchronized):
"""
"""
assert
self
.
state
==
ST_ONLINE
assert
self
.
state
==
ST_ONLINE
assert
self
.
mode
==
Publisher
.
MODE_CNPUB
assert
self
.
mode
==
Publisher
.
MODE_CNPUB
assert
self
.
tagger
is
not
None
while
len
(
self
.
messages
)
>
0
:
while
len
(
self
.
messages
)
>
0
:
try
:
try
:
...
@@ -265,20 +266,17 @@ class Publisher(Channeler, Synchronized):
...
@@ -265,20 +266,17 @@ class Publisher(Channeler, Synchronized):
self
.
state
=
ST_ONLINE
self
.
state
=
ST_ONLINE
self
.
on_operational
(
True
)
self
.
on_operational
(
True
)
elif
self
.
mode
==
Publisher
.
MODE_CNPUB
:
elif
(
self
.
mode
==
Publisher
.
MODE_CNPUB
)
and
isinstance
(
payload
,
ConfirmSelectOk
)
:
# Because only in this case it makes sense to check for MODE_CNPUB
# Because only in this case it makes sense to check for MODE_CNPUB
# A-OK! Boot it.
if
isinstance
(
payload
,
ConfirmSelectOk
):
self
.
tagger
=
AtomicTagger
()
# A-OK! Boot it.
self
.
state
=
ST_ONLINE
self
.
state
=
ST_ONLINE
self
.
on_operational
(
True
)
self
.
on_operational
(
True
)
# now we need to listen for BasicAck and BasicNack
self
.
tagger
=
AtomicTagger
()
mw
=
MethodWatch
(
self
.
channel_id
,
(
BasicAck
,
BasicNack
),
# now we need to listen for BasicAck and BasicNack
self
.
_on_cnpub_delivery
)
mw
.
oneshot
=
False
mw
=
MethodWatch
(
self
.
channel_id
,
(
BasicAck
,
BasicNack
),
self
.
connection
.
watch
(
mw
)
self
.
_on_cnpub_delivery
)
self
.
_mode_cnpub_process_deliveries
()
mw
.
oneshot
=
False
self
.
connection
.
watch
(
mw
)
self
.
_mode_cnpub_process_deliveries
()
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