how to kill the running @db.query in rescue statment.? With in 5
seconds whatever records fetched from db, How can i get those results?
As far as I understand the mechanisms of a RDBMS thats an “all or
nothing” strategy. You could kill the task after 5 secs, but wouldn’t
get anything or wait until finished and have it all.
Another way would be to fetch in bunches of about 1000 Datasets and
stop the time, and when the 5 secs are gone, you can use all the
“bunches” you queried so far
HTH
Norbert
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.