def get_worker(self): def echo(worker, body): if "error_occurred" in body: raise Exception("Error occurred") return body return Worker( handlers={"echo": echo}, queue=Manager(), )
def get_publisher(self): return Manager()