Skip to content

Commit 4ab59f0

Browse files
committed
Time is schedulable
1 parent 4db0d1d commit 4ab59f0

4 files changed

Lines changed: 6 additions & 8 deletions

File tree

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
condition: service_healthy
2525
restart: true
2626
postgres:
27-
image: "postgres:17"
27+
image: "docker.io/postgres:17"
2828
networks:
2929
- packet-network-dev
3030
environment:

packet/routes/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def create_packet() -> Tuple[str, int]:
7676
if not ldap.is_evals(ldap.get_member(username)):
7777
return 'Forbidden: not Evaluations Director', 403
7878

79-
base_date: date = datetime.strptime(request.json['start_date'], '%m/%d/%Y').date()
79+
base_date: date = datetime.strptime(request.json['start_date'], '%m/%d/%Y %H')
8080

8181
freshmen_in_post: Dict[str, POSTFreshman] = {
8282
freshman.rit_username: freshman for freshman in map(POSTFreshman, request.json['freshmen'])

packet/templates/include/admin/new_packets.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h5 class="modal-title" id="new-packets-modal-label">New Packets</h5>
1010
</div>
1111
<div class="modal-body">
1212
<div class="form-group">
13-
<input type="text" class="form-control" placeholder="Date Packets start (MM/DD/YYYY)" id="packet-start-date" required>
13+
<input type="text" class="form-control" placeholder="Date Packets start (MM/DD/YYYY HH [EST])" id="packet-start-date" required>
1414
<input type="file" class="form-control custom-file" id="newPacketsFile" required>
1515
</div>
1616
</div>

packet/utils.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,9 @@ def sync_freshman(freshmen_list: dict) -> None:
161161
db.session.commit()
162162

163163

164-
def create_new_packets(base_date: date, freshmen_list: dict) -> None:
165-
packet_start_time = time(hour=19)
166-
packet_end_time = time(hour=21)
167-
start = datetime.combine(base_date, packet_start_time)
168-
end = datetime.combine(base_date, packet_end_time) + timedelta(days=14)
164+
def create_new_packets(base_date: datetime, freshmen_list: dict) -> None:
165+
start = base_date
166+
end = base_date + timedelta(days=14)
169167

170168
app.logger.info('Fetching data from LDAP...')
171169
all_upper = list(filter(

0 commit comments

Comments
 (0)