8000 Stdout-in-nohup sample script · golemfactory/golem-kernel-python@01d648c · GitHub
[go: up one dir, main page]

Skip to content

Commit 01d648c

Browse files
committed
Stdout-in-nohup sample script
1. pip3 install -r requirements.txt 2. python3 t1.py This script creates a single line of output. When we remove "echo 'AAA'", there are 4 lines. When we redirect "ttt.sh" output to >/dev/null, we also get 4 lines.
1 parent dc6b497 commit 01d648c

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

v0/t1.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ async def prepare_activity(activity):
2222
commands.Deploy(),
2323
commands.Start(),
2424
commands.Run(f'echo "{SCRIPT}" > ttt.sh'),
25-
commands.Run("nohup timeout 5 bash ttt.sh &"),
25+
commands.Run("nohup bash ttt.sh &"),
2626
)
2727
try:
2828
await batch.wait(timeout=30)
@@ -58,12 +58,6 @@ async def main():
5858
async with golem:
5959
activity = await get_activity(golem)
6060
print(activity)
61-
# batch = await activity.execute_commands(
62-
# commands.Run(['/usr/local/bin/python', 'shell.py', 'read'])
63-
# )
64-
# await batch.wait(timeout=10)
65-
# print(batch.events)
66-
6761

6862
if __name__ == '__main__':
6963
loop = asyncio.get_event_loop()

0 commit comments

Comments
 (0)
0