Purge a mailbox.
963189
def purge(cls, domain, login, background=False):
        """"""
        oper = cls.call('domain.mailbox.purge', domain, login)
        if background:
            return oper
        else:
            cls.echo('Purging in progress')
            cls.display_progress(oper)
475605
def remove(self, transport):
        
        recipients = copy.copy(self.recipients)
        for address, recManager in recipients.items():
            recManager.remove(transport)
            if not len(recManager.transports):
                del self.recipients[address]
1233445
public function cleanUp()
    {
        $this->status = self::STATUS_CLEANINGUP;
        if ($this->process->isRunning()) {
            $this->sendTERMSignal();
        } else {
            $this->status = self::STATUS_CLEANEDUP;
        }

    }
902000
public void deleteMails(String as[], String as1[]) throws MessagingException, IOException {
	Folder folder;
	Message amessage[];
	folder = _store.getFolder("INBOX");
	folder.open(2);
	Map<String, Message> map = getMessages(null, folder, as1, as, startrow, maxrows, false);
	Iterator<String> iterator = map.keySet().iterator();
	amessage = new Message[map.size()];
	int i = 0;
	while (iterator.hasNext()) {
	    amessage[i++] = map.get(iterator.next());
	}
	try {
	    folder.setFlags(amessage, new Flags(javax.mail.Flags.Flag.DELETED), true);
	}
	finally {
	    folder.close(true);
	}
    }
1081504
def delete(self, event):
        """"""
        assert self.receiver_id == event.receiver_id
        event.response = {'status': 410, 'message': 'Gone.'}
        event.response_code = 410
1107247
def cleanup(self):
        """"""
        keys = self.client.smembers(self.keys_container)
        for key in keys:
            entry = self.client.get(key)
            if entry:
                entry = pickle.loads(entry)
                if self._is_expired(entry, self.timeout):
                    self.delete_entry(key)
276937
def maybe_clean(self):
        """"""

        now = time.time()
        if self.next_cleaning <= now:
            keys_to_delete = []
            for (k, v) in self.data.iteritems():
                if v.expiration <= now:
                    keys_to_delete.append(k)
            for k in keys_to_delete:
                del self.data[k]
            now = time.time()
            self.next_cleaning = now + self.cleaning_interval
1340586
def delete(self):
        """"""
        params = {"email": self.email_address}
        response = self._delete("/admins.json", params=params)
464915
def deinit(self):
        """"""
        # Clean up after ourselves
        self._process.terminate()
        procs.remove(self._process)
        self._mq.remove()
        queues.remove(self._mq)
958339
def cleanup():
    """"""
    for sck in list(Wdb._sockets):
        try:
            sck.close()
        except Exception:
            log.warn('Error in cleanup', exc_info=True)
554265
static function cleanup()
    {
        $availableHandlers = eZNotificationEventFilter::availableHandlers();

        $db = eZDB::instance();
        $db->begin();
        foreach( $availableHandlers as $handler )
        {
            if ( $handler !== false )
            {
                $handler->cleanup();
            }
        }
        $db->commit();
    }
122719
def cleanup(self):
        """"""
        for item in self.server_map:
            self.member_del(item, reconfig=False)
        self.server_map.clear()
657063
def cleanup(self):
        """"""
        for _id, shard in self._shards.items():
            if shard.get('isServer', False):
                Servers().remove(shard['_id'])
            if shard.get('isReplicaSet', False):
                ReplicaSets().remove(shard['_id'])

        for mongos in self._routers:
            Servers().remove(mongos)

        for config_id in self._configsvrs:
            self.configdb_singleton.remove(config_id)

        self._configsvrs = []
        self._routers = []
        self._shards = {}
640285
def purge_queue():
    """"""
    def action(queue):
        queue.purge()
        click.secho('Indexing queue has been purged.', fg='green')
        return queue
    return action
922971
def cleanup(self):
        """"""
        expires = maybe_timedelta(self.expires)
        for model in self.TaskModel, self.TaskSetModel:
            model._default_manager.delete_expired(expires)
987479
def purgeAutoSelected(self):
        """"""
        params = self._autoParams.allData()
        for p in params:
            comps_to_remove = []
            for comp in p['selection']:
                if self.indexByComponent(comp) is None:
                    comps_to_remove.append(comp)
            for orphaned in comps_to_remove:
                p['selection'].remove(orphaned)
10491
def unsuppress(self, email):
        """"""
        params = {"email": email}
        response = self._put(self.uri_for("unsuppress"),
                             body=" ", params=params)