split out db and workerpool