Skip to content

Commit

Permalink
changed reminder scheduling
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf committed Nov 26, 2024
1 parent e233055 commit 30a5326
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lab/experiments/management/commands/send_reminders.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ def handle(self, *args, **options):
# fetch appoinments 24 hours from now
now = timezone.now()
threshold_from = now + timedelta(days=1)
d_to = now + timedelta(days=2)
threshold_to = timezone.make_aware(datetime(d_to.year, d_to.month, d_to.day, 0, 0))
threshold_to = threshold_from + timedelta(hours=1)

appointments = Appointment.objects.filter(
timeslot__start__gt=threshold_from, timeslot__start__lt=threshold_to, reminder_sent=None
Expand Down

0 comments on commit 30a5326

Please sign in to comment.