Skip to content
This repository has been archived by the owner on Nov 17, 2024. It is now read-only.

Commit

Permalink
refactor: increase timeout and add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
segadora committed Nov 10, 2024
1 parent 559ddc2 commit 1f45610
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (solarAssistant *SolarAssistant) updateWorkModeSchedule(c *gin.Context) {
log.Printf("waiting to see if form is correctly updated")

// workaround due to bug, possibly in ui
time.Sleep(10 * time.Second)
time.Sleep(30 * time.Second)

needUpdate := false
for i := 1; i <= 4; i++ {
Expand Down Expand Up @@ -187,7 +187,11 @@ func (solarAssistant *SolarAssistant) updateWorkModeSchedule(c *gin.Context) {
}
}

time.Sleep(10 * time.Second)
log.Printf("waiting for apis to finish")

time.Sleep(30 * time.Second)

log.Printf("all should be complete")

c.JSON(http.StatusOK, gin.H{
"status": "success",
Expand Down Expand Up @@ -235,6 +239,8 @@ func (solarAssistant *SolarAssistant) updateWorkSchedule(page *rod.Page, m map[s

containerEl.MustElement("button[type=submit]").MustClick().MustWaitStable()

page.MustScreenshot("test.png")

return true
}

Expand Down
2 changes: 1 addition & 1 deletion solar_assistant_browser_automation_api/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: "Solar Assistant Browser Automation Api"
description: "Interacts with solar assistant"
url: https://github.com/segadora/solar-assistant-browser-automation
version: "1.0.0"
version: "1.0.1"
slug: "solar_assistant_browser_automation_api"
init: false
arch:
Expand Down

0 comments on commit 1f45610

Please sign in to comment.