Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-node
Commits
2c69d365
Commit
2c69d365
authored
12 years ago
by
Anael Beutot
Browse files
Options
Downloads
Patches
Plain Diff
Added debug logs for tag handling.
parent
a04f3b22
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
ccnode/tags.py
+7
-1
7 additions, 1 deletion
ccnode/tags.py
with
7 additions
and
1 deletion
ccnode/tags.py
+
7
−
1
View file @
2c69d365
...
...
@@ -145,7 +145,8 @@ def tag_inspector(mod, parent=None):
# whatever it is we don't care...
continue
logger
.
debug
(
'
Introspected %s with ttl %s.
'
,
n
,
ttl
)
logger
.
debug
(
'
Introspected %s with ttl %s, refresh %s for object %s
'
,
n
,
ttl
,
refresh
,
parent
)
# finally add the tag
tags
.
append
(
Tag
(
n
,
m
,
ttl
,
refresh
,
parent
))
...
...
@@ -307,16 +308,19 @@ class TagDB(object):
'
Error while trying to unregister the object %s, %s(
"
%s
"
)
'
)
def
rpc_register_tag
(
self
,
tag
):
logger
.
debug
(
'
RPC register tag %s
'
,
tag
.
name
)
ttl
=
None
if
tag
.
ttl
==
-
1
else
None
self
.
rpc_call
(
tag
.
name
,
self
.
rpc_tag_register_cb
,
'
tags_register
'
,
tag
.
name
,
ttl
,
tag
.
value
)
def
rpc_unregister_tag
(
self
,
tag_name
):
logger
.
debug
(
'
RPC unregister tag %s
'
,
tag_name
)
self
.
rpc_call
(
tag_name
,
self
.
rpc_tag_unregister_cb
,
'
tags_unregister
'
,
tag_name
)
def
rpc_update_tag
(
self
,
sub_id
,
tag
):
"""
Update tag value on cc-server.
"""
logger
.
debug
(
'
RPC update tag %s(%s)
'
,
tag
.
name
,
sub_id
)
if
sub_id
==
'
__main__
'
:
self
.
rpc_call
(
sub_id
+
tag
.
name
,
self
.
rpc_update_tag_cb
,
'
tags_update
'
,
tag
.
name
,
tag
.
value
)
...
...
@@ -325,11 +329,13 @@ class TagDB(object):
'
sub_tags_update
'
,
tag
.
name
,
tag
.
value
)
def
rpc_register_sub_tag
(
self
,
sub_id
,
tag
):
logger
.
debug
(
'
RPC register tag %s(%s)
'
,
tag
.
name
,
sub_id
)
ttl
=
None
if
tag
.
ttl
==
-
1
else
None
self
.
rpc_call
(
tag
.
name
,
self
.
rpc_sub_tag_register_cb
,
'
sub_tags_register
'
,
sub_id
,
tag
.
name
,
ttl
,
tag
.
value
)
def
rpc_unregister_sub_tag
(
self
,
sub_id
,
tag_name
):
logger
.
debug
(
'
RPC unregister tag %s(%s)
'
,
tag_name
,
sub_id
)
self
.
rpc_call
(
tag_name
,
self
.
rpc_sub_tag_unregister_cb
,
'
sub_tags_unregister
'
,
sub_id
,
tag_name
)
...
...
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