-
Notifications
You must be signed in to change notification settings - Fork 750
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more reliable account event processing (#6489)
- Loading branch information
Showing
4 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions
20
kitsune/users/management/commands/process_account_events.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from django.core.management.base import BaseCommand | ||
|
||
from kitsune.users.tasks import process_unprocessed_account_events | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Process all unprocessed account events created within the given past number of days." | ||
|
||
def add_arguments(self, parser): | ||
parser.add_argument( | ||
"num_days_ago", | ||
type=int, | ||
help=( | ||
"The past number of days within which the " | ||
"unprocessed account events have been created." | ||
), | ||
) | ||
|
||
def handle(self, *args, **options): | ||
process_unprocessed_account_events.delay(options["num_days_ago"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters