Przeglądaj źródła

start working on TriggerLauncher

nico 8 lat temu
rodzic
commit
b198afb326
1 zmienionych plików z 24 dodań i 0 usunięć
  1. 24 0
      core/TriggerLauncher.py

+ 24 - 0
core/TriggerLauncher.py

@@ -0,0 +1,24 @@
+import logging
+
+logging.basicConfig()
+logger = logging.getLogger("jarvis")
+
+
+class TriggerLauncher(object):
+    def __init__(self):
+        pass
+
+    @classmethod
+    def start_trigger(cls, trigger_name, callback, parameters=None):
+        """
+
+        :param trigger_name: Name of the trigger class to instantiate
+        :param callback: Callback function to call when the trigger
+        catch the magic word
+        :param parameters: Dict of parameter to send to the trigger
+        :return:
+        """
+        pass
+        # plugin = neuron.name.capitalize()
+        # plugin = plugin.capitalize()
+        # _run_plugin(plugin, neuron.parameters)