Skip to content

Commit

Permalink
logging to trace cancelling requests, #231.
Browse files Browse the repository at this point in the history
  • Loading branch information
stonier committed May 15, 2014
1 parent 029d567 commit 8a28476
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ def _update(self, external_update=False):
# Releasing
########################################
for reply in releasing_replies:
rospy.loginfo("Scheduler : releasing resources from cancelled request [%s]" % (reply.msg.resources))
#print("Releasing Resources: %s" % [r.rapp for r in reply.msg.resources])
#print(" Releasing Resources: %s" % [r.uri for r in reply.msg.resources])
#print(" Clients: %s" % self._clients.keys())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def cancel_all_requests(self):
cancels everything and starts reissuing new requests).
'''
#self._lock.acquire()
rospy.loginfo("Requester : cancelling all requests")
self._requester.cancel_all()
self._requester.send_requests()
#self._lock.release()
Expand All @@ -137,6 +138,7 @@ def _requester_feedback(self, request_set):
elif request.msg.status == scheduler_msgs.Request.GRANTED:
self._flag_resource_trackers(request.msg.resources, tracking=True, allocated=True, high_priority_flag=high_priority_flag)
if request_completely_unallocated(request):
rospy.loginfo("Requester : cancelling request [has been completely unallocated]")
request.cancel()
elif request.msg.status == scheduler_msgs.Request.CLOSED:
self._flag_resource_trackers(request.msg.resources, tracking=False, allocated=False)
Expand Down

0 comments on commit 8a28476

Please sign in to comment.