webhooks: Require a subscription to receive gcode output
Add a new "gcode/subscribe_output" webhook endpoint to subscribe to gcode output. Only client connections that subscribe to the gcode output will receive that output. This also moves all the gcode webhooks from gcode.py to webhooks.py and arranges for gcode.py to be initialized prior to webhooks.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -59,7 +59,7 @@ class Printer:
|
||||
self.event_handlers = {}
|
||||
self.objects = collections.OrderedDict()
|
||||
# Init printer components that must be setup prior to config
|
||||
for m in [webhooks, gcode]:
|
||||
for m in [gcode, webhooks]:
|
||||
m.add_early_printer_objects(self)
|
||||
def get_start_args(self):
|
||||
return self.start_args
|
||||
|
||||
Reference in New Issue
Block a user