make the local_task decorator work with TaskHandler class