Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more logging to publisher update calls. #979

Merged
merged 3 commits into from
Feb 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions tools/rosmaster/src/rosmaster/master_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,20 @@ def publisher_update_task(api, topic, pub_uris):
@param pub_uris: list of publisher APIs to send to node
@type pub_uris: [str]
"""

mloginfo("publisherUpdate[%s] -> %s", topic, api)
#TODO: check return value for errors so we can unsubscribe if stale
xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
msg = "publisherUpdate[%s] -> %s %s" % (topic, api, pub_uris)
mloginfo(msg)
start_sec = time.time()
try:
#TODO: check return value for errors so we can unsubscribe if stale
ret = xmlrpcapi(api).publisherUpdate('/master', topic, pub_uris)
msg_suffix = "result=%s" % ret
except Exception as ex:
msg_suffix = "exception=%s" % ex
raise
finally:
delta_sec = time.time() - start_sec
mloginfo("%s: sec=%0.2f, %s", msg, delta_sec, msg_suffix)


def service_update_task(api, service, uri):
"""
Expand Down