membershipworks: Remove simple-history duplicates every hour
This commit is contained in:
parent
0cd88c00f1
commit
1255d0ddc6
@ -9,6 +9,7 @@ def post_migrate_callback(sender, **kwargs):
|
||||
|
||||
from .tasks.event_survey_emails import send_survey_emails
|
||||
from .tasks.scrape import scrape_events, scrape_membershipworks
|
||||
from .tasks.simple_history import q_clean_duplicate_history
|
||||
from .tasks.ucsAccounts import sync_accounts
|
||||
|
||||
ensure_scheduled(
|
||||
@ -32,6 +33,11 @@ def post_migrate_callback(sender, **kwargs):
|
||||
schedule_type=Schedule.HOURLY,
|
||||
)
|
||||
|
||||
ensure_scheduled(
|
||||
q_clean_duplicate_history,
|
||||
schedule_type=Schedule.HOURLY,
|
||||
)
|
||||
|
||||
|
||||
class MembershipworksConfig(AppConfig):
|
||||
default_auto_field = "django.db.models.BigAutoField"
|
||||
|
9
membershipworks/tasks/simple_history.py
Normal file
9
membershipworks/tasks/simple_history.py
Normal file
@ -0,0 +1,9 @@
|
||||
import django.core.management
|
||||
|
||||
from cmsmanage.django_q2_helper import q_task_group
|
||||
|
||||
|
||||
# TODO: this probably should be more global, instead of owned by membershipworks app
|
||||
@q_task_group("Clean Duplicate History")
|
||||
def q_clean_duplicate_history():
|
||||
django.core.management.call_command("clean_duplicate_history", "--auto")
|
Loading…
Reference in New Issue
Block a user