Yes, this would raise an error if there actually no tasks and we reach this time, however the rpc should return long before the deadline if there truly are no tasks. As for retrying, I think we should leave that for the user code to handle these errors/restarting.