Thread
#prefect-community
    i

    Italo Barros

    1 year ago
    It's possible to create custom states? Also, it's possible to aggregate (or search) by an error string (or by state) instead of debugging the log of each run on the Cloud?
    Kevin Kho

    Kevin Kho

    1 year ago
    Hey @Italo Barros, for creating custom states, currently no, but I think this will be possible in the future. You can search for a State in the UI. If you want to search by error string, I think you may need to query the GraphQL API for task run states with the given state message.
    This is the most basic query
    query{
      task_run_state{
    		id
        message
        state
      }
    }
    i

    Italo Barros

    1 year ago
    Got it, thank you @Kevin Kho! Just one last question, is possible to change the tasks run name to a custom one? For example, let's suppose that I have a task that runs every 5 minutes, and instead of a random name (like "magic-shrew") I would like to do something like task_{timestamp}
    Kevin Kho

    Kevin Kho

    1 year ago
    Are we talking about Flow or tasks just to be sure?
    If it’s Flows, there is a RenameFlowRun task
    i

    Italo Barros

    1 year ago
    The Tasks, using my previous example, lets suppose that I have one Flow that run a Task every 5 minutes, and instead of the random run names on bellow I would like to do a custom one
    Kevin Kho

    Kevin Kho

    1 year ago
    The only thing available that might work for this is templating task run names .
    i

    Italo Barros

    1 year ago
    Wounderful, thank you!