async def create_token(self, search: str = None) -> PipelineToken: '''Awaitable. Create a pipeline token that identifies this object (its parameters).''' await self._clean() self._get_rule(search) self._get_server() self._refactor() self._validate() if not hasattr(self._meta, "pipeline"): raise RuntimeError("Pyot pipeline for this model is not activated or lost") return PipelineToken(self._meta.pipeline.model, self._meta.server, self._meta.key, self._meta.load, self._meta.query)
async def create_token(self) -> PipelineToken: '''Awaitable. Create a pipeline token that identifies this object (its parameters).''' await self._setup() self._get_rule() self._get_server() self._clean() try: return PipelineToken(self._meta.pipeline.model, self._meta.server, self._meta.key, self._meta.load, self._meta.query) except AttributeError as e: raise RuntimeError("Token creation failed, please make sure pipeline is activated") from e