code: def update_result(trigger_id, msg, status):
      
      service = TriggerService.objects.get(id=trigger_id)
      # if status is True, reset *_failed counter
      if status:
          provider_failed = 0
          consumer_failed = 0
          counter_ok = service.counter_ok + 1
          counter_ko = service.counter_ko
      # otherwise, add 1 to the consumer_failed
      else:
          provider_failed = service.provider_failed
          consumer_failed = service.consumer_failed + 1
          counter_ok = service.counter_ko
          counter_ko = service.counter_ko + 1
  
          status = False if consumer_failed > settings.DJANGO_TH.get('failed_tries', 5) else True
  
          warn_user_and_admin('consumer', service)
  
      TriggerService.objects.filter(id=trigger_id).update(
          result=msg,
          date_result=now(),
          provider_failed=provider_failed,
          consumer_failed=consumer_failed,
          counter_ok=counter_ok,
          counter_ko=counter_ko,
          status=status)
  
      UserService.objects.filter(user=service.user, name=service.consumer.name).update(
          counter_ok=counter_ok,
          counter_ko=counter_ko)
docs: :param trigger_id: trigger id
      :param msg: result msg
      :param status: status of the handling of the current trigger
      :return: