def handle_noargs(self, **options): """handler function that removes all signal listeners then runs the job and finally restores the listerers """ signal_data = signals.pop_all_db_signal_receivers() self.run_command(**options) signals.set_all_db_signal_receivers(signal_data)
def handle_noargs(self, **options): signal_data = signals.pop_all_db_signal_receivers() self.run_command() signals.set_all_db_signal_receivers(signal_data)
def handle_noargs(self, *args, **options): signal_data = signals.pop_all_db_signal_receivers() languages = models.Tag.objects.values_list('language_code').distinct() for lang in languages: self.run_command(lang) signals.set_all_db_signal_receivers(signal_data)