def force_update_cleanliness_flags(): """ Once a month, go through all cleanliness flags without using hints """ # the only reason this task is run is to use the soft_assert to validate # that there are no bugs in the weekly task. # If we haven't seen any issues by the end of 2015 (so 6 runs) we should remove this. set_cleanliness_flags_for_enabled_domains(force_full=True)
def handle(self, *args, **options): from casexml.apps.phone.cleanliness import ( set_cleanliness_flags_for_domain, set_cleanliness_flags_for_enabled_domains) force_full = options['force'] if len(args) == 1: domain = args[0] set_cleanliness_flags_for_domain(domain, force_full=force_full) else: assert len(args) == 0 set_cleanliness_flags_for_enabled_domains(force_full=force_full)
def update_cleanliness_flags(): """ Once a week go through all cleanliness flags and see if any dirty ones have become clean """ set_cleanliness_flags_for_enabled_domains(force_full=False)