Skip to content

Commit

Permalink
datastore: store multiline commands as one entry
Browse files Browse the repository at this point in the history
Signed-off-by:  Eric Callahan <[email protected]>
  • Loading branch information
Arksine committed Nov 17, 2024
1 parent d4ef626 commit ccfe32f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions moonraker/components/data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,9 @@ def _update_gcode_store(self, response: str) -> None:

def _store_gcode_command(self, script: str) -> None:
curtime = time.time()
for cmd in script.split('\n'):
cmd = cmd.strip()
if not cmd:
continue
if script.strip():
self.gcode_queue.append(
{'message': cmd, 'time': curtime, 'type': "command"}
{'message': script, 'time': curtime, 'type': "command"}
)

async def _handle_gcode_store_request(self,
Expand Down

0 comments on commit ccfe32f

Please sign in to comment.