Hi all, I am trying to retrieve the result (what i...
# ask-community
a
Hi all, I am trying to retrieve the result (what is returned) after executing a local docker deployment. As an example, what I get is type='reference' serializer_type='pickle' storage_block_id=UUID('201be8bb-b742-4645-9b7c-6cdcce007d7c') storage_key='36cbbc4e543649dabe195c3ebde33344') if I ask for state.result() or Completed() if i ask for state. Is there any example I can check? (FYI I use persist_result=True and return_state=True)
c
What value are you expecting back ? Checking state.result() should give you the return of your task
a
@Christopher Boyd, I expect to get the value I return in my dockerized flow, in this case a str
c
Have you checked fetch()? https://docs.prefect.io/api-ref/prefect/client/schemas/ That should resolve references to result objects
a
Yes, I just get Completed()
I got it to work. For anyone interested the dockerized flow must have persist_result=True . For the result_storage either use a LocalFileSystem storage linked to a "bind mount" (i.e. a volume shared between host and container) or a remote storage accessible by both the host and the container (e.g. S3 compatible).