[Optimization] Unrolls Consumer.on_task method call