Skip to content

Commit

Permalink
Fixed suggestions from plugin review
Browse files Browse the repository at this point in the history
  • Loading branch information
crysxd committed Nov 23, 2021
1 parent 11e1448 commit 2bf9215
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions octoprint_octoapp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ def on_event(self, event, payload):

def send_notification(self, data, highPriority):
self._logger.debug('send_notification')
threading.Thread(target=self.do_send_notification, args=[data, highPriority]).start()
t = threading.Thread(target=self.do_send_notification, args=[data, highPriority])
t.daemon = True
t.start()

def do_send_notification(self, data, highPriority):
try:
Expand Down Expand Up @@ -217,7 +219,9 @@ def on_api_command(self, command, data):
return flask.jsonify(dict())

def get_config(self):
threading.Thread(target=self.do_update_config).start()
t = threading.Thread(target=self.do_update_config)
t.daemon = True
t.start()
return self.cached_config

def do_update_config(self):
Expand All @@ -243,15 +247,15 @@ def do_update_config(self):

def get_update_information(self):
return dict(
octolight=dict(
octoapp=dict(
displayName="OctoApp",
displayVersion=self._plugin_version,

type="github_release",
current=self._plugin_version,

user="crysxd",
repo="OctoApp",
repo="OctoApp-Plugin",
pip="https://github.com/crysxd/OctoApp-Plugin/archive/{target}.zip"
)
)
Expand Down

0 comments on commit 2bf9215

Please sign in to comment.