Would it be nicer to wrap the call to `with_db` in a pair of calls to set the IO priority to a non-interactive value? That'd simplify the diff as well as prevent the maintenance mode bypass from leaking out of this call.