MCPcopy Create free account
hub / github.com/StackStorm/st2 / stop

Method stop

st2common/st2common/services/sensor_watcher.py:106–124  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

104 self.connection.release()
105
106 def stop(self):
107 LOG.debug("Shutting down sensor watcher.")
108 try:
109 if self._updates_thread:
110 self._updates_thread = concurrency.kill(self._updates_thread)
111
112 if self.connection:
113 channel = self.connection.channel()
114 bound_sensor_watch_q = self._sensor_watcher_q(channel)
115 try:
116 bound_sensor_watch_q.delete()
117 except:
118 LOG.error(
119 "Unable to delete sensor watcher queue: %s",
120 self._sensor_watcher_q,
121 )
122 finally:
123 if self.connection:
124 self.connection.release()
125
126 @staticmethod
127 def _get_queue(queue_suffix):

Calls 3

killMethod · 0.80
releaseMethod · 0.80
deleteMethod · 0.45