Note that wfGetDB() uses \Wikimedia\Rdbms\LoadBalancer::getMaintenanceConnectionRef internally. Check if that connection ref is really necessary for this use case.
Also note from the documentation of wfGetDB():
* Note 3: When replacing calls to this with calls to methods on an injected * LoadBalancer, LoadBalancer::getConnectionRef is more commonly needed than * LoadBalancer::getMaintenanceConnectionRef, which is needed for more advanced * administrative tasks. See the IMaintainableDatabase and IDatabase interfaces * for details.
Acceptance Criteria:
- wfGetDB() is no longer used in DispatchStats
- wfGetDB() is no longer used in tests for this class