Skip to content

Commit 13ff417

Browse files
committed
Revert "Temporary - Wake up computers during atdp hours"
This reverts commit ba20603.
1 parent d93a566 commit 13ff417

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

staff/lab/lab-wakeup

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import argparse
44
import subprocess
55
import sys
6-
from datetime import datetime
7-
from datetime import time
86

97
from ocflib.infra.hosts import hosts_by_filter
108
from ocflib.lab.hours import read_hours_listing
@@ -25,19 +23,6 @@ def wake_hosts(filter, quiet):
2523
)
2624

2725

28-
def is_atdp_hours(when=None):
29-
"""Return whether the given time is during atdp hours.
30-
31-
If not provided, when defaults to now.
32-
"""
33-
days = [0, 2, 4] # Monday, Wednesday, Friday
34-
open_time = time(8, 00) # 8:00 AM
35-
close_time = time(16, 30) # 4:30 PM
36-
if when is None:
37-
when = datetime.now()
38-
return when.weekday() in days and open_time <= when.time() <= close_time
39-
40-
4126
def main(argv=None):
4227
parser = argparse.ArgumentParser(description=__doc__)
4328
parser.add_argument('-f', '--force', action='store_true',
@@ -49,7 +34,7 @@ def main(argv=None):
4934
args = parser.parse_args(argv)
5035
force = args.force or args.host
5136

52-
if force or read_hours_listing().is_open() or is_atdp_hours():
37+
if force or read_hours_listing().is_open():
5338
wake_hosts(
5439
build_host_filter(args.host) if args.host else ALL_HOSTS_FILTER,
5540
args.quiet,

0 commit comments

Comments
 (0)