Exemplo n.º 1
0
 def handle(self, **options):  # pylint: disable=unused-argument
     """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)
Exemplo n.º 2
0
 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, *args, **options):
     signal_data = signals.pop_all_db_signal_receivers()
     languages = set(models.Tag.objects.values_list(
                                 'language_code', flat=True
                             ).distinct())
     for lang in languages:
         self.run_command(lang)
     signals.set_all_db_signal_receivers(signal_data)
Exemplo n.º 4
0
 def handle_noargs(self, *args, **options):
     signal_data = signals.pop_all_db_signal_receivers()
     languages = set(
         models.Tag.objects.values_list('language_code',
                                        flat=True).distinct())
     for lang in languages:
         self.run_command(lang)
     signals.set_all_db_signal_receivers(signal_data)