Hello,
I am wondering if there is a way to set a timeout on an await call ?
Essentially I have a script where the user is asked a yes / no question, if the user says yes the script continues, if they say no the script aborts gracefully. Upon aborting two functions are run to update statuses in my tables.
However if the user does nothing, the script eventually timesout and aborts, and no “shutdown” functions are run.
My question is the following: can I limit the await user input call to x number of seconds, so that upon timeout I can run my functions before ending the script ?
Thanks in advance !
Best,
Oscar