-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from PrefectHQ/thread-kwarg
fix flow thread kwarg
- Loading branch information
Showing
2 changed files
with
21 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import controlflow as cf | ||
|
||
thread_id = "test-thread" | ||
|
||
|
||
@cf.flow(thread=thread_id) | ||
def flow_1(): | ||
task = cf.Task("get the user's name", result_type=str, user_access=True) | ||
return task | ||
|
||
|
||
@cf.flow(thread=thread_id) | ||
def flow_2(): | ||
task = cf.Task("write the user's name backwards, if you don't know it, say so") | ||
return task | ||
|
||
|
||
if __name__ == "__main__": | ||
flow_1() | ||
flow_2() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters