-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
finish example file_transfer #7
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider adding a short readme?
also don't forget to update version number
roles = ["sender", "receiver"] | ||
participants = [] | ||
threads = [] | ||
for i in range(2): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
task_id = cls[0].run_task("file_transfer", "example.txt", participants, True) | ||
cls[1].wait_task(task_id) | ||
recv_file = cls[1].read_entry("example:file_transfer:receive_file_content") | ||
print("Received file: ", recv_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review naming?
|
||
with open("param.json",'r') as f: | ||
param = json.load(f) | ||
file_name = base64.b64decode(param["param"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
check_exit_code = 0 | ||
|
||
[[file_transfer.roles.sender.playbook.steps]] | ||
step_name = "load_file" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reorganize? ln?
|
||
[[file_transfer.roles.receiver.playbook.steps]] | ||
step_name = "store_file" | ||
process = "cp receive_file $(cat file_name)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mv
@@ -0,0 +1,8 @@ | |||
import json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
python -c ?
No description provided.