Skip to content

Commit f3885da

Browse files
authored
48 hours (#70)
1 parent a0562dd commit f3885da

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

constitutional.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ func EvaluatePolls() {
9292
}
9393
for _, poll := range polls {
9494
now := time.Now()
95-
// if OpenedTime + 2 days later is before today, it's been open for less than 48 hours, and we will re-evaluate next run
96-
// if after, it's been more than 48 hours
97-
// we still won't close until 72, but we want to start messaging at 48
98-
if poll.OpenedTime.AddDate(0, 0, 2).After(now) {
95+
// if OpenedTime + 1 day later is before today, it's been open for less than 24 hours, and we will re-evaluate next run
96+
// if after, it's been more than 24 hours
97+
// we still won't close until 48, but we want to start messaging at 24
98+
if poll.OpenedTime.AddDate(0, 0, 1).After(now) {
9999
continue
100100
}
101101

@@ -138,8 +138,8 @@ func EvaluatePolls() {
138138
}
139139
continue
140140
}
141-
// close poll after 72 hours
142-
if poll.OpenedTime.AddDate(0, 0, 3).After(now) {
141+
// close poll after 48 hours
142+
if poll.OpenedTime.AddDate(0, 0, 2).After(now) {
143143
continue
144144
}
145145
// we close the poll here

0 commit comments

Comments
 (0)