add deps and timestamps on db_task_history

also remove some duplicate task_history events