added disconnect special command and added yappi to profile while loop
This commit is contained in:
parent
ad745e067b
commit
d5e4a5f4ae
1 changed files with 9 additions and 0 deletions
|
|
@ -4,6 +4,9 @@ __author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam"
|
|||
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
|
||||
__copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
|
||||
|
||||
### DEBUGING START
|
||||
import yappi
|
||||
### DEBUG END
|
||||
|
||||
import os
|
||||
import glob
|
||||
|
|
@ -498,6 +501,8 @@ class MachineCom(object):
|
|||
|
||||
self._temperature_timer = RepeatedTimer(frequency, self._poll_temperature, run_first=True)
|
||||
self._temperature_timer.start()
|
||||
elif "disconnect" in specialcmd:
|
||||
self.close()
|
||||
else:
|
||||
self._log("Command not Found! %s" % cmd)
|
||||
self._log("available commands are:")
|
||||
|
|
@ -970,6 +975,8 @@ class MachineCom(object):
|
|||
self._sendCommand("?")
|
||||
self._clear_to_send.set()
|
||||
|
||||
yappi.start()
|
||||
|
||||
while self._monitoring_active:
|
||||
try:
|
||||
line = self._readline()
|
||||
|
|
@ -1353,6 +1360,8 @@ class MachineCom(object):
|
|||
eventManager().fire(Events.ERROR, {"error": self.getErrorString()})
|
||||
self._log("Connection closed, closing down monitor")
|
||||
|
||||
yappi.get_func_stats().print_all()
|
||||
|
||||
def _process_registered_message(self, line, feedback_matcher, feedback_controls, feedback_errors):
|
||||
feedback_match = feedback_matcher.search(line)
|
||||
if feedback_match is None:
|
||||
|
|
|
|||
Loading…
Reference in a new issue