Example
begin
Timeout::timeout(5) do
#some code
end
#other codes
#other codes
rescue Timeout::Error
Rails.logger.debug {" Command took longer than expected"}
end
When the #some code
takes longer then 5 sec will it run #other codes
? I was guessing it will not run the #other codes
. It will directly jump to rescue block. Correct me if i m wrong.
Aucun commentaire:
Enregistrer un commentaire