Reduce code duplication in BackgroundJobServer class