Fix(booking-job): Recovery on fillPassengerDetails
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:
@@ -268,8 +268,14 @@ func (env *Env) startBooking(job *Booking, username string, password string, cre
|
|||||||
|
|
||||||
for !passthroughLaggingPage {
|
for !passthroughLaggingPage {
|
||||||
|
|
||||||
filledPassengerDetailContext, filledPassengerDetails := context.WithTimeout(context.Background(), 15*time.Second)
|
filledPassengerDetailContext, filledPassengerDetails := context.WithTimeout(context.Background(), 30*time.Second)
|
||||||
go func() {
|
go func() {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
log.Println("Recovering from fillPassengerDetails panic...")
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
page = fillPassengerDetails(page, name, gender, passport, passportExpiry, contact)
|
page = fillPassengerDetails(page, name, gender, passport, passportExpiry, contact)
|
||||||
log.Println("Passenger details filled.")
|
log.Println("Passenger details filled.")
|
||||||
filledPassengerDetails()
|
filledPassengerDetails()
|
||||||
|
|||||||
Reference in New Issue
Block a user