remove unused code of task producer