Skip to content

Commit

Permalink
change cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Tch1b0 committed Aug 1, 2024
1 parent d0b5eb7 commit d5c94e4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/register_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ async def check_cpu_usage(cpu_high=[False]):
return
decision = bot.decide("CPU has been over 80%% for at least 1 minute", ["ignore", "reboot", "shutdown"])
match decision:
case 1:
os.system("reboot")
case 2:
os.system("shutdown now -h")
case 3:
os.system("reboot")
else:
cpu_high[0] = False

0 comments on commit d5c94e4

Please sign in to comment.