Skip to content

Commit

Permalink
fix republicservices holliday collection
Browse files Browse the repository at this point in the history
  • Loading branch information
5ila5 committed Nov 19, 2023
1 parent affb887 commit ca7d957
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"No Method arg": {
"street_address": "8957 Park Meadows Dr, Elk Grove, CA 95624",
},
"33865 Cassio Cir, Fremont, CA 94555": {
"street_address": "33865 Cassio Cir, Fremont, CA 94555",
},
}
DELAYS = {
" one ": 1,
Expand Down Expand Up @@ -114,7 +117,6 @@ def fetch(self):
}
)
i += 1

# Cycle through schedule and holidays incorporating delays
while True:
changes = 0
Expand All @@ -124,12 +126,10 @@ def fetch(self):
d = holidays[holiday]["delay"]
for pickup in schedule:
p = schedule[pickup]["date"]
date_difference = (p - h).days
if date_difference <= 5 and date_difference >= 0:
if p == h:
revised_date = p + timedelta(days=d)
schedule[pickup]["date"] = revised_date
holidays[holiday]["incorporated"] = True
# print(p, h, d, date_difference, revised_date)
changes += 1
if changes == 0:
break
Expand Down

0 comments on commit ca7d957

Please sign in to comment.