fix a bug of race condition

between worker db preparation and woker inject