CHIMEFRB / workflow

🌊 Working in flowstate.
0 stars 0 forks source link

Workflow Slack Notification Links #69

Closed shinybrar closed 3 months ago

shinybrar commented 4 months ago

The translation of workflow output to be urls should happen on server side, as a result this code is being removed from workflow.lifecycle.attempt

if work:
    product_url = config.get("http", {}).get("baseurls", {}).get("products", "")
    if any(work.notify.slack.model_dump().values()) and work.products:
        work.products = [
            f"<{product_url}{product}|{product}>" for product in work.products
        ]
    if any(work.notify.slack.model_dump().values()) and work.plots:
        work.plots = [f"<{product_url}{plot}|{plot}>" for plot in work.plots]