From 1c2a1c734d0c7a3f44b32ffd4e9358efdb40cbd9 Mon Sep 17 00:00:00 2001 From: Sam Schott Date: Sun, 21 Mar 2021 15:22:21 +0000 Subject: [PATCH] [manager] reordered methods --- src/maestral/manager.py | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/maestral/manager.py b/src/maestral/manager.py index 806a8072..ff4de9aa 100644 --- a/src/maestral/manager.py +++ b/src/maestral/manager.py @@ -309,29 +309,6 @@ class SyncMonitor: self._logger.info(PAUSED) - def connection_monitor(self) -> None: - """ - Monitors the connection to Dropbox servers. Pauses syncing when the connection - is lost and resumes syncing when reconnected and syncing has not been paused by - the user. - """ - - while self._connection_helper_running: - - connected = check_connection("www.dropbox.com") - - if connected != self.connected: - # Log the status change. - self._logger.info(CONNECTED if connected else CONNECTING) - - if connected: - if not self.running.is_set() and self.autostart.is_set(): - self.start() - - self.connected = connected - - time.sleep(self.connection_check_interval) - def reset_sync_state(self) -> None: """Resets all saved sync state. Settings are not affected.""" @@ -364,6 +341,29 @@ class SyncMonitor: # ---- thread methods -------------------------------------------------------------- + def connection_monitor(self) -> None: + """ + Monitors the connection to Dropbox servers. Pauses syncing when the connection + is lost and resumes syncing when reconnected and syncing has not been paused by + the user. + """ + + while self._connection_helper_running: + + connected = check_connection("www.dropbox.com") + + if connected != self.connected: + # Log the status change. + self._logger.info(CONNECTED if connected else CONNECTING) + + if connected: + if not self.running.is_set() and self.autostart.is_set(): + self.start() + + self.connected = connected + + time.sleep(self.connection_check_interval) + def download_worker( self, running: Event,