a

    Alex Furrier

    1 year ago
    Is there a way to assign a task result handler from an imported task? Like the equivalent of this:
    from prefect import task
    from prefect.engine.result.local_result import LocalResult
    from my_prefect_tasks import imported_task
    
    @task(result=LocalResult())
    def assigned_result_task(x):
        return x
    
    imported_task.result_handler = LocalResult()
    Kevin Kho

    Kevin Kho

    1 year ago
    Hey, I think it would be
    task.result=xxx
    , but let me double check. Did that not work?
    Just tested and it seems to work.
    a

    Alex Furrier

    1 year ago
    Yeah that seems to work. Thanks 🙏