gearman client refactor