Remove subscriber from the given observer.

    :param session_id: Subscriber's session identifier
    :param observer_id: Observer identifier
8198
def remove_subscriber(session_id, observer_id):
    
    models.Observer.subscribers.through.objects.filter(
        subscriber_id=session_id, observer_id=observer_id
    ).delete()
661546
def destroy_session(self, session_id):
        

        try:
            del self.sessions[session_id]
        except KeyError:
            pass

        # Invoke hooks
        invoke_hooks(self.hooks, "session_destroyed", session_id)
177632
def delete_subscription(self, subscription_id):
        
        return self.client._delete(self.url + 'subscriptions/{}'.format(subscription_id), headers=self.get_headers())
1255562
def remove(self):
        
        self.logger.debug('Remove subscription from server...')

        data = {
            'command': 'unsubscribe',
            'identifier': self._identifier_string()
        }

        self.connection.send(data)
        self.state = 'unsubscribed'
545951
def delete_event_subscription(self, url):
        
        params = {'callbackUrl': url}
        response = self._do_request('DELETE', '/v2/eventSubscriptions', params)
        return response.json()
1183686
def client_disconnect(self, event):
        
        self.log("Removing disconnected client from subscriptions", lvl=debug)
        client_uuid = event.clientuuid
        self._unsubscribe(client_uuid)
810476
def unsubscribe(self, callback_id):
        
        request = self.get_active_subscription(callback_id)
        request['mode'] = 'unsubscribe'
        self.subscribe_impl(callback_id, **request)
1097999
def subscribe(self, observer):
        
        sid = self._sn
        self.observers[sid] = observer
        self._sn += 1
        return SubscribeID(self, sid)
179142
async def evaluate(self):
        

        @database_sync_to_async
        def remove_subscribers():
            models.Observer.subscribers.through.objects.filter(
                observer_id=self.id
            ).delete()

        @database_sync_to_async
        def get_subscriber_sessions():
            return list(
                models.Observer.subscribers.through.objects.filter(observer_id=self.id)
                .distinct('subscriber_id')
                .values_list('subscriber_id', flat=True)
            )

        try:
            settings = get_queryobserver_settings()

            start = time.time()
            # Evaluate the observer
            added, changed, removed = await database_sync_to_async(self._evaluate)()
            duration = time.time() - start

            # Log slow observers.
            if duration > settings['warnings']['max_processing_time']:
                self._warning("Slow observed viewset", duration=duration)

            # Remove subscribers of really slow observers.
            if duration > settings['errors']['max_processing_time']:
                logger.error(
                    "Removing subscribers to extremely slow observed viewset ({})".format(
                        self._get_logging_id()
                    ),
                    extra=self._get_logging_extra(duration=duration),
                )
                await remove_subscribers()

            if self._meta.change_detection == Options.CHANGE_DETECTION_POLL:
                # Register poller.
                await get_channel_layer().send(
                    CHANNEL_MAIN,
                    {
                        'type': TYPE_POLL,
                        'observer': self.id,
                        'interval': self._meta.poll_interval,
                    },
                )

            message = {
                'type': TYPE_ITEM_UPDATE,
                'observer': self.id,
                'primary_key': self._meta.primary_key,
                'added': added,
                'changed': changed,
                'removed': removed,
            }

            # Only generate notifications in case there were any changes.
            if added or changed or removed:
                for session_id in await get_subscriber_sessions():
                    await get_channel_layer().group_send(
                        GROUP_SESSIONS.format(session_id=session_id), message
                    )

        except Exception:
            logger.exception(
                "Error while evaluating observer ({})".format(self._get_logging_id()),
                extra=self._get_logging_extra(),
            )
213309
@Override
    public void removeConfigObserver(final Observer<ConfigurableRemote<String, M, CONFIG>, CONFIG> observer) {
        configObservable.removeObserver(observer);
    }
1142371
def remove_member(self, member_id):
        
        member_rm_request = etcdrpc.MemberRemoveRequest(ID=member_id)
        self.clusterstub.MemberRemove(
            member_rm_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )
294956
def delete_upload_id(cls, tables: I2B2Tables, upload_id: int) -> int:
        
        return cls._delete_upload_id(tables.crc_connection, tables.observation_fact, upload_id)
138192
def _del_subscription(self, a_filter, session):
        
        deleted = 0
        try:
            subscriptions = self._subscriptions[a_filter]
            for index, (sub_session, qos) in enumerate(subscriptions):
                if sub_session.client_id == session.client_id:
                    self.logger.debug("Removing subscription on topic '%s' for client %s" %
                                      (a_filter, format_client_message(session=session)))
                    subscriptions.pop(index)
                    deleted += 1
                    break
        except KeyError:
            # Unsubscribe topic not found in current subscribed topics
            pass
        finally:
            return deleted
1061642
def remove(self, session_id):
        
        session = self._items.get(session_id, None)

        if session is not None:
            session.promoted = -1
            session.on_delete(True)
            del self._items[session_id]
            return True

        return False
275046
public void unregister(EventObserver<?> observer){
        for (Map.Entry<Class, Set<EventObserver>> entry : observers.entrySet()) {
            entry.getValue().remove(observer);
        }

    }
971985
def remove_from_subscriptions(self, subscription):
        
        assert isinstance(subscription, github.Repository.Repository), subscription
        headers, data = self._requester.requestJsonAndCheck(
            "DELETE",
            "/user/subscriptions/" + subscription._identity
        )
80664
public static synchronized boolean remove(MavenSession session, Watcher watcher) {
        return !(session == null || watcher == null) && get(session).remove(watcher);
    }