From 1225a2501d8b88c330c31ba604e8a21b471ec5fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 9 May 2016 15:27:17 +0200 Subject: [PATCH 1/2] Fix a stupid mistake in the german translation --- .../translations/de/LC_MESSAGES/messages.mo | Bin 63280 -> 63280 bytes .../translations/de/LC_MESSAGES/messages.po | 4 ++-- translations/de/LC_MESSAGES/messages.mo | Bin 63280 -> 63280 bytes translations/de/LC_MESSAGES/messages.po | 4 ++-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.mo b/src/octoprint/translations/de/LC_MESSAGES/messages.mo index aa52755f0e9f932dfa98ffdbfd1ca9df5b6ec6c5..947535d8e6bffbbd671296510d4c001ae08d51c5 100644 GIT binary patch delta 29 jcmdn+j(GzR8Fa8)Dj1qt8JTT1?^rF#Sho4`Lf=pTu;2@s delta 29 jcmdn+j(GzR8Fa9lC>R=B8JTZ3?^rF#n6~-xLf=pTunr4@ diff --git a/src/octoprint/translations/de/LC_MESSAGES/messages.po b/src/octoprint/translations/de/LC_MESSAGES/messages.po index e0194ed0..9215382c 100644 --- a/src/octoprint/translations/de/LC_MESSAGES/messages.po +++ b/src/octoprint/translations/de/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: OctoPrint\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" "POT-Creation-Date: 2016-05-04 13:26+0200\n" -"PO-Revision-Date: 2016-05-04 13:27+0100\n" +"PO-Revision-Date: 2016-05-09 15:26+0100\n" "Last-Translator: Gina Häußge \n" "Language: de\n" "Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n" @@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19 msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading." -msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du for dem Softwareupdate wissen solltest." +msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du vor dem Softwareupdate wissen solltest." #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22 #: src/octoprint/templates/dialogs/confirmation.jinja2:8 diff --git a/translations/de/LC_MESSAGES/messages.mo b/translations/de/LC_MESSAGES/messages.mo index aa52755f0e9f932dfa98ffdbfd1ca9df5b6ec6c5..947535d8e6bffbbd671296510d4c001ae08d51c5 100644 GIT binary patch delta 29 jcmdn+j(GzR8Fa8)Dj1qt8JTT1?^rF#Sho4`Lf=pTu;2@s delta 29 jcmdn+j(GzR8Fa9lC>R=B8JTZ3?^rF#n6~-xLf=pTunr4@ diff --git a/translations/de/LC_MESSAGES/messages.po b/translations/de/LC_MESSAGES/messages.po index e0194ed0..9215382c 100644 --- a/translations/de/LC_MESSAGES/messages.po +++ b/translations/de/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: OctoPrint\n" "Report-Msgid-Bugs-To: i18n@octoprint.org\n" "POT-Creation-Date: 2016-05-04 13:26+0200\n" -"PO-Revision-Date: 2016-05-04 13:27+0100\n" +"PO-Revision-Date: 2016-05-09 15:26+0100\n" "Last-Translator: Gina Häußge \n" "Language: de\n" "Language-Team: German (http://www.transifex.com/projects/p/octoprint/language/de/)\n" @@ -789,7 +789,7 @@ msgstr "Das wird die folgenden Komponenten aktualisieren und den Server neu star #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:19 msgid "Be sure to read through any linked release notes, especially those for OctoPrint since they might contain important information you need to know before upgrading." -msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du for dem Softwareupdate wissen solltest." +msgstr "Bitte lies alle verlinkten Release Notes, insbesondere die von OctoPrint, da diese wichtige Informationen behinhalten könnten, die Du vor dem Softwareupdate wissen solltest." #: src/octoprint/plugins/softwareupdate/templates/softwareupdate.jinja2:22 #: src/octoprint/templates/dialogs/confirmation.jinja2:8 From 91b5fc6b0d13f43ceff3e922e5e83e4f1fc48b4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 10 May 2016 09:48:20 +0200 Subject: [PATCH 2/2] Force synchronization of sockjs message sending --- src/octoprint/server/util/sockjs.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/octoprint/server/util/sockjs.py b/src/octoprint/server/util/sockjs.py index 66ab8603..6663834b 100644 --- a/src/octoprint/server/util/sockjs.py +++ b/src/octoprint/server/util/sockjs.py @@ -43,6 +43,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer. self._lastCurrent = 0 self._baseRateLimit = 0.5 + self._emit_mutex = threading.RLock() + def _getRemoteAddress(self, info): forwardedFor = info.headers.get("X-Forwarded-For") if forwardedFor is not None: @@ -194,7 +196,8 @@ class PrinterStateConnection(sockjs.tornado.SockJSConnection, octoprint.printer. self.sendEvent(event, payload) def _emit(self, type, payload): - try: - self.send({type: payload}) - except Exception as e: - self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e))) + with self._emit_mutex: + try: + self.send({type: payload}) + except Exception as e: + self._logger.warn("Could not send message to client %s: %s" % (self._remoteAddress, str(e)))