Fix(optimise)
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
All checks were successful
ktm-booking-bot/ktm-booking-bot/pipeline/head This commit looks good
This commit is contained in:
@@ -448,13 +448,14 @@ func selectBookingSlot(ctx context.Context, page *rod.Page, timeCode string, del
|
|||||||
|
|
||||||
needToWait = true
|
needToWait = true
|
||||||
|
|
||||||
|
log.Printf("[%d] Maintenance modal detected on booking page", delay)
|
||||||
time.Sleep(1000 * time.Millisecond)
|
time.Sleep(1000 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start probing
|
// Start probing
|
||||||
reportedTicketDetails := false
|
reportedTicketDetails := false
|
||||||
completed := false
|
completed := false
|
||||||
retries := 3
|
retries := 5
|
||||||
for !completed {
|
for !completed {
|
||||||
if retries <= 0 {
|
if retries <= 0 {
|
||||||
log.Printf("[%d] Used up retries. Exiting.", delay)
|
log.Printf("[%d] Used up retries. Exiting.", delay)
|
||||||
|
|||||||
Reference in New Issue
Block a user