Skip to content

Commit

Permalink
Schedule onboarding email reminders
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvanrun committed Feb 7, 2025
1 parent 0d3836d commit e07a425
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app/config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1230,6 +1230,10 @@ def sentry_before_send(event, hint):
"task": "grandchallenge.statistics.tasks.update_site_statistics_cache",
"schedule": crontab(hour=5, minute=30),
},
"send_onboarding_task_reminder_emails": {
"task": "grandchallenge.challenge.tasks.send_onboarding_task_reminder_emails",
"schedule": crontab(hour=6, minute=0),
},
"delete_users_who_dont_login": {
"task": "grandchallenge.profiles.tasks.delete_users_who_dont_login",
"schedule": timedelta(hours=1),
Expand Down
2 changes: 1 addition & 1 deletion app/grandchallenge/challenges/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def save_phase():


@acks_late_2xlarge_task
def sent_onboarding_task_reminders():
def send_onboarding_task_reminder_emails():
onboarding_task_info = (
OnboardingTask.objects.with_overdue_status()
.values("challenge")
Expand Down
4 changes: 2 additions & 2 deletions app/tests/challenges_tests/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
OnboardingTask,
)
from grandchallenge.challenges.tasks import (
sent_onboarding_task_reminders,
send_onboarding_task_reminder_emails,
update_challenge_results_cache,
update_compute_costs_and_storage_size,
)
Expand Down Expand Up @@ -357,7 +357,7 @@ def test_challenge_onboarding_task_due_emails(
with mocker.patch(
"grandchallenge.challenges.models.now", return_value=_mock_now
):
sent_onboarding_task_reminders()
send_onboarding_task_reminder_emails()

if staff_email_subject:
staff_email = next(m for m in mail.outbox if staff_user.email in m.to)
Expand Down

0 comments on commit e07a425

Please sign in to comment.