Esempio n. 1
0
 def ensure_user_account_sanity(self, request, queryset):
     count = 0
     from cosinnus_message.rocket_chat import RocketChatConnection
     rocket = RocketChatConnection()
     for user in queryset:
         rocket.ensure_user_account_sanity(user)
         count += 1
     message = _('%d Users rocketchat accounts were checked.') % count
     self.message_user(request, message)
Esempio n. 2
0
 def run(self):
     try:
         rocket = RocketChatConnection()
         rocket.ensure_user_account_sanity(user)
     except Exception as e:
         logger.exception(e)