Skip to content

Commit

Permalink
writing to exit file
Browse files Browse the repository at this point in the history
  • Loading branch information
yosefmih committed Mar 26, 2024
1 parent a911fee commit e0fc87d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ def main():
"""
starts a no-op task that consumes resources
"""
# print("consuming cpu")
# consume_cpu()
# print("consuming memory")
# consume_memory()
print("consuming cpu")
consume_cpu()
print("consuming memory")
consume_memory()
print("sleeping for 70 seconds")
time.sleep(70)

Expand Down
2 changes: 1 addition & 1 deletion shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def handle_signal(signum, _):
allowing other processes to stop doing work
"""
print(f"handling signal {signum}")
with open(exit_file(), "wb") as f:
with open(exit_file(), "w", encoding="utf-8") as f:
f.write(signum)


Expand Down

0 comments on commit e0fc87d

Please sign in to comment.