Handle case with DB cursor error
This method doesn't handle cursor error/disconnect. This may lead for situation when cursor dies and clients wait for it infinitely.
Recommended solution would be to wrap it in retry decorator. In case of N failures fail whole running process.
Edited by Ghost User