db_kyc_project/backend/misc/management/commands/send_settings.py

11 lines
364 B
Python
Raw Normal View History

2024-12-13 16:45:21 +03:00
from django.core.management.base import BaseCommand, CommandError
from misc.celery import deliver_setting
from misc.models import Setting
class Command(BaseCommand):
help = 'Sends all settings to rmq for batcher to consume'
def handle(self, *args, **options):
for setting in Setting.objects.all():
deliver_setting.delay(setting.name)