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
aeff807b
Commit
aeff807b
authored
8 years ago
by
Piotr Maślanka
Browse files
Options
Downloads
Patches
Plain Diff
moar logging
parent
90a678a7
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/framing/compilation/content_property.py
+0
-1
0 additions, 1 deletion
coolamqp/framing/compilation/content_property.py
coolamqp/uplink/connection/connection.py
+8
-0
8 additions, 0 deletions
coolamqp/uplink/connection/connection.py
with
8 additions
and
1 deletion
coolamqp/framing/compilation/content_property.py
+
0
−
1
View file @
aeff807b
...
@@ -117,7 +117,6 @@ def _compile_particular_content_property_list_class(zpf, fields):
...
@@ -117,7 +117,6 @@ def _compile_particular_content_property_list_class(zpf, fields):
def
compile_particular_content_property_list_class
(
zpf
,
fields
):
def
compile_particular_content_property_list_class
(
zpf
,
fields
):
q
=
_compile_particular_content_property_list_class
(
zpf
,
fields
)
q
=
_compile_particular_content_property_list_class
(
zpf
,
fields
)
logger
.
debug
(
'
Compiling
\n
%s
'
,
q
)
loc
=
{}
loc
=
{}
exec
(
q
,
globals
(),
loc
)
exec
(
q
,
globals
(),
loc
)
return
loc
[
'
ParticularContentTypeList
'
]
return
loc
[
'
ParticularContentTypeList
'
]
...
...
This diff is collapsed.
Click to expand it.
coolamqp/uplink/connection/connection.py
+
8
−
0
View file @
aeff807b
...
@@ -84,6 +84,8 @@ class Connection(object):
...
@@ -84,6 +84,8 @@ class Connection(object):
def
on_connected
(
self
):
def
on_connected
(
self
):
"""
Called by handshaker upon reception of final connection.open-ok
"""
"""
Called by handshaker upon reception of final connection.open-ok
"""
logger
.
info
(
'
Connection ready.
'
)
self
.
state
=
ST_ONLINE
self
.
state
=
ST_ONLINE
while
len
(
self
.
callables_on_connected
)
>
0
:
while
len
(
self
.
callables_on_connected
)
>
0
:
...
@@ -107,6 +109,8 @@ class Connection(object):
...
@@ -107,6 +109,8 @@ class Connection(object):
else
:
else
:
break
break
logger
.
info
(
'
Connected to broker, authentication in progress
'
)
sock
.
settimeout
(
0
)
sock
.
settimeout
(
0
)
sock
.
send
(
b
'
AMQP
\x00\x00\x09\x01
'
)
sock
.
send
(
b
'
AMQP
\x00\x00\x09\x01
'
)
...
@@ -131,6 +135,8 @@ class Connection(object):
...
@@ -131,6 +135,8 @@ class Connection(object):
and second time from ListenerThread when socket is disposed of
and second time from ListenerThread when socket is disposed of
Therefore we need to make sure callbacks are called EXACTLY once
Therefore we need to make sure callbacks are called EXACTLY once
"""
"""
logger
.
info
(
'
Connection lost
'
)
self
.
state
=
ST_OFFLINE
# Update state
self
.
state
=
ST_OFFLINE
# Update state
watchlists
=
[
self
.
watches
[
channel
]
for
channel
in
self
.
watches
]
watchlists
=
[
self
.
watches
[
channel
]
for
channel
in
self
.
watches
]
...
@@ -158,6 +164,8 @@ class Connection(object):
...
@@ -158,6 +164,8 @@ class Connection(object):
if
isinstance
(
payload
,
ConnectionClose
):
if
isinstance
(
payload
,
ConnectionClose
):
self
.
send
([
AMQPMethodFrame
(
0
,
ConnectionCloseOk
())])
self
.
send
([
AMQPMethodFrame
(
0
,
ConnectionCloseOk
())])
logger
.
info
(
u
'
Broker closed our connection - code %s reason %s
'
,
payload
.
reply_code
,
payload
.
reply_text
.
tobytes
().
decode
(
'
utf8
'
))
elif
isinstance
(
payload
,
ConnectionCloseOk
):
elif
isinstance
(
payload
,
ConnectionCloseOk
):
self
.
send
(
None
)
self
.
send
(
None
)
...
...
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