Technologist, engineer, full-stack developer, Linux user and open source advocate. A skilled stick thrower, amateur chef, and an excellent lover…
I suppose this is a trivial refactor, and in 99% of cases it certainly is. But the solution is right at our fingertips, so why not do a proper app startup and wait for a successful db connection.