Factor loader into a database storer and a batch loader

im not exactly sure why you need it to be a []*workers. You dont have to use append here and you arent modifying the worker elements somewhere else. As far as i see you throw this reference away. In which case preallocating the array and using a []<struct> seems better.