Added database connection closing and reopening on the queue worker #5