add database reconnect fix in case Resque workers become too inactive