Process notifications.
327330
def process_notifications(self, messages):
        """"""
        for object_id, object_size, metadata_size in messages:
            if object_size > 0 and object_id in self._waiting_dict:
                linked_list = self._waiting_dict[object_id]
                self._complete_future(linked_list)
1280545
def notifications(self):
        
        if self._notifications is None:
            self._notifications = NotificationList(self._version, service_sid=self._solution['sid'], )
        return self._notifications
1140132
def process_task(self):
        """"""
        pdu = RegisterForeignDevice(self.bbmdTimeToLive)
        pdu.pduDestination = self.bbmdAddress

        # send it downstream
        self.request(pdu)
278518
def process_events(self):
        """"""
        for event, args in iter_except(self.event_queue.popleft, IndexError):
            for callback in self.event_callbacks[event]:
                callback(*args)
239245
def handle_data(self, data):
        """"""
        if 'id' in data:
            self.handle_response(data)
        else:
            self.handle_notification(data)
668279
protected void notifyEndBundlingProcess() {

		processingBundle.set(false);
		synchronized (processingBundle) {
			processingBundle.notifyAll();
		}

		for (BundlingProcessLifeCycleListener listener : lifeCycleListeners) {
			listener.afterBundlingProcess();
		}

	}
1049523
def process(self, sched, coro):
        """"""
        super(Signal, self).process(sched, coro)
        self.result = len(sched.sigwait[self.name])
        if self.result < self.recipients:
            sched.signals[self.name] = self
            self.coro = coro
            return

        for waitop, waitcoro in sched.sigwait[self.name]:
            waitop.result = self.value
        if self.prio & priority.OP:
            sched.active.extendleft(sched.sigwait[self.name])
        else:
            sched.active.extend(sched.sigwait[self.name])

        if self.prio & priority.CORO:
            sched.active.appendleft((None, coro))
        else:
            sched.active.append((None, coro))

        del sched.sigwait[self.name]
532454
def notify(self, value):
        """"""

        with self.lock:
            #TODO: this could slow down slow-rate incoming updates
            # since the number of ticks depends on the actual time
            # passed since the latest notification. Consider using
            # a real timer to tick the EWMA.

            self.tick()

            for avg in (self.m1, self.m5, self.m15, self.day):
                avg.update(value)
            self.count += value
253053
def handle_notification(self, msgtype, method, args, kwargs):
        """"""
        self.dispatch.call(method, args, kwargs)
614416
def notify_update(self):
    """"""
    with self._lock:
      for event in self._update_events:
        event.set()
      self._update_events.clear()
1137617
def process_notice(self, notice):
        
        id = notice["id"]

        _a, _b, _ = id.split(".")

        if id in self.subscription_objects:
            self.on_object(notice)

        elif ".".join([_a, _b, "x"]) in self.subscription_objects:
            self.on_object(notice)

        elif id[:4] == "2.6.":
            # Treat account updates separately
            self.on_account(notice)
167385
def process_actions(self, actions):
        
        notices = {}
        notification_contacts = {}
        for action in actions:
            resource = action['resource']
            action_status = ActionStatus.SUCCEED

            try:
                if action['action'] == AuditActions.REMOVE:
                    action_status = self.process_action(
                        resource,
                        AuditActions.REMOVE
                    )
                    if action_status == ActionStatus.SUCCEED:
                        db.session.delete(action['issue'].issue)

                elif action['action'] == AuditActions.STOP:
                    action_status = self.process_action(
                        resource,
                        AuditActions.STOP
                    )
                    if action_status == ActionStatus.SUCCEED:
                        action['issue'].update({
                            'missing_tags': action['missing_tags'],
                            'notes': action['notes'],
                            'last_alert': action['last_alert'],
                            'state': action['action']
                        })

                elif action['action'] == AuditActions.FIXED:
                    db.session.delete(action['issue'].issue)

                elif action['action'] == AuditActions.ALERT:
                    action['issue'].update({
                        'missing_tags': action['missing_tags'],
                        'notes': action['notes'],
                        'last_alert': action['last_alert'],
                        'state': action['action']
                    })

                db.session.commit()

                if action_status == ActionStatus.SUCCEED:
                    for owner in [
                        dict(t) for t in {tuple(d.items()) for d in (action['owners'] + self.permanent_emails)}
                    ]:
                        if owner['value'] not in notification_contacts:
                            contact = NotificationContact(type=owner['type'], value=owner['value'])
                            notification_contacts[owner['value']] = contact
                            notices[contact] = {
                                'fixed': [],
                                'not_fixed': []
                            }
                        else:
                            contact = notification_contacts[owner['value']]

                        if action['action'] == AuditActions.FIXED:
                            notices[contact]['fixed'].append(action)
                        else:
                            notices[contact]['not_fixed'].append(action)
            except Exception as ex:
                self.log.exception('Unexpected error while processing resource {}/{}/{}/{}'.format(
                    action['resource'].account.account_name,
                    action['resource'].id,
                    action['resource'],
                    ex
                ))

        return notices
191384
def ProcessMessage(self, message):
    """"""
    self.ProcessResponse(message.source.Basename(), message.payload)
221669
def start(self):
        """"""
        # observers for this channel only need to wait for one value
        self._observer_params.update(dict(once=True))
        super(CurrentResourceValue, self).start()
        self._api.ensure_notifications_thread()
        self._api._mds_rpc_post(
            device_id=self.device_id,
            method='GET',
            uri=self.resource_path,
            async_id=self.async_id,
            _wrap_with_consumer=False,
        )
376273
def stdout_notifications(notifications):
    
    for error in notifications["errors"]:
        LOGGER.error(error)
    for warn in notifications["warnings"]:
        LOGGER.warning(warn)
604533
def UpdateUserNotifications(self, username, timestamps, state=None):
    """"""
    if not timestamps:
      return

    for n in self.notifications_by_username.get(username, []):
      if n.timestamp in timestamps:
        n.state = state
600901
def process_request(self):
        """"""
        self.response = self.request_handler.process_request(
            self.method, self.request_data)