Skip to content

Commit

Permalink
Added time needed for printing file to PrintDone event's payload
Browse files Browse the repository at this point in the history
Fixes #333
  • Loading branch information
foosel committed Jan 9, 2014
1 parent 417487e commit 620d7de
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/octoprint/util/comm.py
Expand Up @@ -664,7 +664,8 @@ def _monitor(self):
self._changeState(self.STATE_OPERATIONAL)
eventManager().fire(Events.PRINT_DONE, {
"file": self._currentFile.getFilename(),
"origin": self._currentFile.getFileLocation()
"origin": self._currentFile.getFileLocation(),
"time": time.time() - self._currentFile.getStartTime()
})
elif 'Done saving file' in line:
self.refreshSdFiles()
Expand Down Expand Up @@ -937,7 +938,8 @@ def _sendNext(self):
else:
payload = {
"file": self._currentFile.getFilename(),
"origin": self._currentFile.getFileLocation()
"origin": self._currentFile.getFileLocation(),
"time": time.time() - self._currentFile.getStartTime()
}
self._callback.mcPrintjobDone()
self._changeState(self.STATE_OPERATIONAL)
Expand Down

0 comments on commit 620d7de

Please sign in to comment.