Removes obsolete entries from the metadata of all stored routines.
350338
def __remove_obsolete_metadata(self):
        
        clean = {}
        for key, _ in self._source_file_names.items():
            if key in self._pystratum_metadata:
                clean[key] = self._pystratum_metadata[key]

        self._pystratum_metadata = clean
329669
def cleanup_services(self):
        
        services = self.list_services()

        for service in services:
            if service.namespace in self.managed_namespaces:
                service.delete()
874604
protected function cleanup()
    {
        $this->stmt->closeCursor();

        $this->stmt          = null;
        $this->rsm           = null;
        $this->cache         = [];
        $this->metadataCache = [];

        $this->em
             ->getEventManager()
             ->removeEventListener([Events::onClear], $this);
    }
148498
void cleanUpStaleEntries() {
        for (KeyedRef<K, V> ref = q.poll(); ref != null; ref = q.poll()) {
            map.remove(ref.getKey(), ref); // CONCURRENT remove() operation
        }
    }
122719
def cleanup(self):
        """"""
        for item in self.server_map:
            self.member_del(item, reconfig=False)
        self.server_map.clear()
469705
def cleanup_pbar(self):
        """"""
        if hasattr(self, 'pbar') and self.pbar:
            self.pbar.close()
            self.pbar = None
819370
public void clear() {
    mMap.forEach((key, value) -> {
      onCacheUpdate(key, value.mValue);
      onRemove(key);
    });
    mMap.clear();
  }
993288
def clean(docs=False, bytecode=False, extra=''):
    ''''''
    patterns = ['build', 'dist', 'cover', 'docs/_build', '**/*.pyc', '*.egg-info', '.tox', '**/__pycache__']
    for pattern in patterns:
        print('Removing {0}'.format(pattern))
        lrun('rm -rf {0}'.format(pattern))
559936
def cleanup(self):
        
        remove = []
        for handle, assoc in self.assocs.items():
            if assoc.expiresIn == 0:
                remove.append(handle)
        for handle in remove:
            del self.assocs[handle]
        return len(remove), len(self.assocs)
842168
private void cleanup() {
        Entry<K, V>[] tab = this.table;

        for (int i = tab.length ; i-- > 0 ;) {
            for (Entry<K, V> e = tab[i], prev = null; e != null; e = e.next) {
                if (e.get() == null) {
                    // Clean up after a cleared Reference.
                    this.modCount++;
                    if (prev != null) {
                        prev.next = e.next;
                    } else {
                        tab[i] = e.next;
                    }
                    this.count--;
                } else {
                    prev = e;
                }
            }
        }
    }
1192979
def clear(self):
        
        for f in [x['content'] for x in self.metadata.values()]:
            os.remove(f)

        self.metadata = {}
        self._flush()
1168753
def clean(self):
        
        self._table.clear()
        for item in self._usage_recency:
            self._usage_recency.remove(item)
919841
public void cleanUpNullReferences() {
        final Iterator<Map.Entry<Object, Object>> iterator = cache.entrySet().iterator();
        while (iterator.hasNext()) {
            final Map.Entry<Object, Object> entry = iterator.next();
            Object entryVal = entry.getValue();
            if (entryVal != null && ((SoftReference) entryVal).get() == null) cache.remove(entry.getKey(), entryVal);
        }
    }
922971
def cleanup(self):
        """"""
        expires = maybe_timedelta(self.expires)
        for model in self.TaskModel, self.TaskSetModel:
            model._default_manager.delete_expired(expires)
18004
@VisibleForTesting
    void removeAllCacheEntries() {
        List<CacheEntry> entries;
        synchronized (this.cacheEntries) {
            entries = new ArrayList<>(this.cacheEntries.values());
            this.cacheEntries.clear();
        }

        removeFromCache(entries);
        if (entries.size() > 0) {
            log.debug("{}: Cleared all cache entries ({}).", this.traceObjectId, entries.size());
        }
    }
752403
private function dropObsoleteRoutines(): void
  {
    // Make a lookup table from routine name to source.
    $lookup = [];
    foreach ($this->sources as $source)
    {
      $lookup[$source['routine_name']] = $source;
    }

    // Drop all routines not longer in sources.
    foreach ($this->rdbmsOldMetadata as $old_routine)
    {
      if (!isset($lookup[$old_routine['routine_name']]))
      {
        $this->io->logInfo('Dropping %s <dbo>%s</dbo>',
                           strtolower($old_routine['routine_type']),
                           $old_routine['routine_name']);

        DataLayer::dropRoutine($old_routine['routine_type'], $old_routine['routine_name']);
      }
    }
  }
357099
def cleanup_datastore(self):
    """"""
    print_header('CLEANING UP ENTIRE DATASTORE')
    kinds_to_delete = [u'Submission', u'SubmissionType',
                       u'DatasetImage', u'DatasetBatch',
                       u'AdversarialImage', u'AdversarialBatch',
                       u'Work', u'WorkType',
                       u'ClassificationBatch']
    keys_to_delete = [e.key for k in kinds_to_delete
                      for e in self.datastore_client.query_fetch(kind=k)]
    self._cleanup_keys_with_confirmation(keys_to_delete)