Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Z-Bolt/OctoScreen.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-04-10 19:23:32 +0300
committerJeffB42 <10328858+JeffB42@users.noreply.github.com>2021-04-10 19:23:32 +0300
commitecfc324279313e7cb939d9551eb92f91e11774a8 (patch)
treeca0ac8f55ce9c900e1150b9daa4ab052c019fd75
parent2ae914bf0f63df7393733149eaf9892ebe86bff5 (diff)
bumped background tread to 20, added some additional logging2.7.2-dev
-rwxr-xr-xui/ui.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/ui/ui.go b/ui/ui.go
index a60be6e..2f4b90e 100755
--- a/ui/ui.go
+++ b/ui/ui.go
@@ -100,7 +100,7 @@ func New(endpoint, key string, width, height int) *UI {
}
instance.splashPanel = NewSplashPanel(instance)
- instance.backgroundTask = utils.CreateBackgroundTask(time.Second * 10, instance.update)
+ instance.backgroundTask = utils.CreateBackgroundTask(time.Second * 20, instance.update)
instance.initialize()
logger.TraceLeave("ui.New()")
@@ -159,7 +159,13 @@ func (this *UI) verifyConnection() {
newUIState := "<<uninitialized-state>>"
splashMessage := "<<uninitialized-message>>"
+ logger.Debug("ui.verifyConnection() - about to call ConnectionRequest.Do()")
+ t1 := time.Now()
connectionResponse, err := (&octoprintApis.ConnectionRequest{}).Do(this.Client)
+ t2 := time.Now()
+ logger.Debug("ui.verifyConnection() - finished calling ConnectionRequest.Do()")
+ logger.Debugf("time elapsed: %q", t2.Sub(t1))
+
if err == nil {
logger.Debug("ui.verifyConnection() - ConnectionRequest.Do() succeeded")
jsonResponse, err := utils.StructToJson(connectionResponse)
@@ -176,8 +182,9 @@ func (this *UI) verifyConnection() {
this.loadSettings()
}
} else {
- logger.LogError("ui.verifyConnection()", "Broke into the else condition because Do(ConnectionRequest) returned an error", err)
+ logger.LogError("ui.verifyConnection()", "Broke into the else condition because ConnectionRequest.Do() returned an error", err)
newUIState, splashMessage = this.getUiStateAndMessageFromError(err, newUIState, splashMessage)
+ logger.Debugf("ui.verifyConnection() - newUIState is now: %s", newUIState)
}
this.splashPanel.Label.SetText(splashMessage)