refactor the code about etltask db connection