Expected Behavior
Setting a reuse policy should be as simple and intuitive as using an enum e.g.
reuse_policy = ReuseIdPolicy.IGNORE
workflow_client.schedule_new_workflow(
workflow=tracker_workflow,
instance_id=str(run_id),
input={},
reuse_id_policy=reuse_policy # Prevents "workflow already exists" errors
)
Actual Behavior
- Orchestration is an underlying durabletask term, this should not bleed through to the public API
- Protobuf concerns should not bleed through to the public API
# Create reuse policy to ignore if workflow already exists (handles race conditions)
reuse_policy = pb.OrchestrationIdReusePolicy(action=pb.IGNORE)
workflow_client.schedule_new_workflow(
workflow=tracker_workflow,
instance_id=str(run_id),
input={},
reuse_id_policy=reuse_policy # Prevents "workflow already exists" errors
)
Release Note
RELEASE NOTE: