예제 #1
0
    def handle(self, **kwargs):
        domains = kwargs['domains'].split(',')

        for domain in domains:
            print("Resync all contacts' phone numbers for project %s  " % domain)
            print("Synching for phone numbers")
            commcare_user_ids = (
                CommCareUser.ids_by_domain(domain, is_active=True) +
                CommCareUser.ids_by_domain(domain, is_active=False)
            )
            for user_id in with_progress_bar(commcare_user_ids):
                sms_sync_user_phone_numbers.delay(user_id)
            self.sync_cases(domain)
예제 #2
0
    def handle(self, **kwargs):
        domains = kwargs['domains'].split(',')

        for domain in domains:
            print("Resync all contacts' phone numbers for project %s  " %
                  domain)
            print("Synching for phone numbers")
            commcare_user_ids = (
                CommCareUser.ids_by_domain(domain, is_active=True) +
                CommCareUser.ids_by_domain(domain, is_active=False))
            for user_id in with_progress_bar(commcare_user_ids):
                sms_sync_user_phone_numbers.delay(user_id)
            self.sync_cases(domain)
예제 #3
0
def sync_user_phone_numbers(sender, couch_user, **kwargs):
    from corehq.apps.sms.tasks import sync_user_phone_numbers as sms_sync_user_phone_numbers
    sms_sync_user_phone_numbers.delay(couch_user.get_id)
예제 #4
0
def sync_user_phone_numbers(sender, couch_user, **kwargs):
    from corehq.apps.sms.tasks import sync_user_phone_numbers as sms_sync_user_phone_numbers
    sms_sync_user_phone_numbers.delay(couch_user.get_id)