Chore(booking-page): More sleep allowance for booking slot page load
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good

This commit is contained in:
2022-10-29 00:40:18 +08:00
parent 8be27ce214
commit bece8b7cca

View File

@@ -413,7 +413,7 @@ func getBookingSlots(browser *rod.Browser, onwardDate string, reverse bool) *rod
} }
func selectBookingSlot(ctx context.Context, page *rod.Page, timeCode string) *rod.Page { func selectBookingSlot(ctx context.Context, page *rod.Page, timeCode string) *rod.Page {
time.Sleep(1 * time.Second) time.Sleep(5 * time.Second)
// Initial closing of maintenance modal // Initial closing of maintenance modal
bodyText := page.MustElement("body").MustText() bodyText := page.MustElement("body").MustText()
if strings.Contains(bodyText, "System maintenance scheduled at 23:00 to 00:15 (UTC+8)") { if strings.Contains(bodyText, "System maintenance scheduled at 23:00 to 00:15 (UTC+8)") {