Skip to content

module 3.6 - adjust human in the loop implementation #142

@sgbaird

Description

@sgbaird

I was going to share a human-in-the-loop workflow orchestration example from the robotics microcourse, and noticed a mention of it here:

https://ac-microcourses.readthedocs.io/en/latest/courses/robotics/3.6-solid-sample-transfer.html#error-handling

@task
def notify_operator(task_id):
    print(f"ALERT: Task {task_id} has failed. An operator needs to check the robot.")
    # In a real scenario, this could send an email, SMS, or trigger an alert system
    operator_response = input("Has the issue been resolved? (yes/no): ")
    return operator_response.lower() == "yes"

However, this should be using Prefect's built in functionality and should be adjusted to follow what's shown in https://youtu.be/4tnaL9ts6CQ?si=A9v8bF5LfNFekStB with slack notifications and include a link to that YouTube video.

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions