Skip to content

Commit

Permalink
Rename again, I changed my mind
Browse files Browse the repository at this point in the history
  • Loading branch information
itsisak committed Oct 9, 2024
1 parent 11f50ab commit 5744627
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lego/apps/events/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ def notify_event_creator_when_payment_overdue(self, logger_context=None):


@celery_app.task(serializer="json", bind=True, base=AbakusTask)
def handle_overdue_payment(self, logger_context=None):
def handle_missing_payment_after_deadline(self, logger_context=None):
"""
Task that automatically assigns penalty, unregisters user from event
and notifies them when payment is overdue.
Expand Down
6 changes: 3 additions & 3 deletions lego/apps/events/tests/test_async_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from lego.apps.events.models import Event, Registration
from lego.apps.events.tasks import (
AsyncRegister,
handle_overdue_payment,
handle_missing_payment_after_deadline,
async_register,
async_retrieve_payment,
bump_waiting_users_to_new_pool,
Expand Down Expand Up @@ -805,7 +805,7 @@ def test_user_is_given_penalty_is_unregistered_and_notified(
number_of_registrations_before = self.event.number_of_registrations
number_of_penalties_before = registration_two.user.number_of_penalties()

handle_overdue_payment.delay()
handle_missing_payment_after_deadline.delay()
registration_two.refresh_from_db()

self.assertLess(
Expand Down Expand Up @@ -841,7 +841,7 @@ def test_user_is_not_given_penalty_is_not_unregistered_and_not_notified(
number_of_registrations_before = self.event.number_of_registrations
number_of_penalties_before = registration_two.user.number_of_penalties()

handle_overdue_payment.delay()
handle_missing_payment_after_deadline.delay()
registration_two.refresh_from_db()

self.assertEqual(
Expand Down
8 changes: 4 additions & 4 deletions lego/settings/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ def on_setup_logging(**kwargs):
},
"notify_event_creator_when_payment_overdue": {
"task": "lego.apps.events.tasks.notify_event_creator_when_payment_overdue",
"schedule": crontab(hour=21, minute=0),
},
"handle_overdue_payment": {
"task": "lego.apps.events.tasks.handle_overdue_payment",
"schedule": crontab(hour=9, minute=0),
},
"handle_missing_payment_after_deadline": {
"task": "lego.apps.events.tasks.handle_missing_payment_after_deadline",
"schedule": crontab(hour=21, minute=0),
},
"sync-external-systems": {
"task": "lego.apps.external_sync.tasks.sync_external_systems",
"schedule": crontab(hour="*", minute=0),
Expand Down

0 comments on commit 5744627

Please sign in to comment.