management: add possibility to limit cron to a single application (#28040)

This commit is contained in:
Frédéric Péters 2018-11-15 11:46:17 +01:00
parent d9df32c8a6
commit 64ea265733
1 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,8 @@ class Command(BaseCommand):
for appconfig in apps.get_app_configs():
if not hasattr(appconfig, 'hourly'):
continue
if options.get('application') and appconfig.name != options.get('application'):
continue
if hasattr(appconfig, 'is_enabled') and not appconfig.is_enabled():
continue
try: