Monitor how much of the index is upgraded.

        Any additional keyword arguments will be passed to
        ``Elasticsearch.indices.get_upgrade`` unchanged.
482033
def get_upgrade(self, using=None, **kwargs):
        
        return self._get_connection(using).indices.get_upgrade(index=self._name, **kwargs)
1283226
def _index_range(self, version, symbol, from_version=None, **kwargs):
        
        from_index = None
        if from_version:
            from_index = from_version['up_to']
        return from_index, None
1041484
def already_pending_upgrade(self, upgrade_type: UpgradeId) -> Union[int, float]:
        
        assert isinstance(upgrade_type, UpgradeId)
        if upgrade_type in self.state.upgrades:
            return 1
        level = None
        if "LEVEL" in upgrade_type.name:
            level = upgrade_type.name[-1]
        creationAbilityID = self._game_data.upgrades[upgrade_type.value].research_ability.id
        for structure in self.units.structure.ready:
            for order in structure.orders:
                if order.ability.id is creationAbilityID:
                    if level and order.ability.button_name[-1] != level:
                        return 0
                    return order.progress
        return 0
14835
private void updateStatistic(OIndex<?> index) {
    if (OProfiler.getInstance().isRecording()) {
      OProfiler.getInstance().updateCounter("Query.indexUsage", 1);
      final int paramCount = index.getDefinition().getParamCount();
      if (paramCount > 1) {
        OProfiler.getInstance().updateCounter("Query.compositeIndexUsage", 1);
        OProfiler.getInstance().updateCounter("Query.compositeIndexUsage." + paramCount, 1);
      }
    }
  }
174737
def _load_upgrades(self, remove_applied=True):
        
        if remove_applied:
            self.load_history()

        for entry_point in iter_entry_points('invenio_upgrader.upgrades'):
            upgrade = entry_point.load()()
            self.__class__._upgrades[upgrade.name] = upgrade

        return self.__class__._upgrades
739451
def update(self, **kwargs):
        """"""
        if 'monitor' in kwargs:
            value = self._format_monitor_parameter(kwargs['monitor'])
            kwargs['monitor'] = value
        elif 'monitor' in self.__dict__:
            value = self._format_monitor_parameter(self.__dict__['monitor'])
            self.__dict__['monitor'] = value
        return super(Pool, self)._update(**kwargs)
5257
def _check_update_(self):
        """"""
        try:
            data = requests.get("https://pypi.python.org/pypi/jira/json", timeout=2.001).json()

            released_version = data['info']['version']
            if parse_version(released_version) > parse_version(__version__):
                warnings.warn(
                    "You are running an outdated version of JIRA Python %s. Current version is %s. Do not file any bugs against older versions." % (
                        __version__, released_version))
        except requests.RequestException:
            pass
        except Exception as e:
            logging.warning(e)
1089187
def perform(self, store, count):
        
        self.count = count

        try:
            self.upgradeStore(store)
            print 'Upgrade complete'
        except errors.ItemUpgradeError as e:
            print 'Upgrader error:'
            e.originalFailure.printTraceback(file=sys.stdout)
            print self.errorMessageFormat % (
                e.oldType.typeName, e.storeID, e.oldType.schemaVersion,
                e.newType.schemaVersion)
1015979
def doPoolUpgrade(self, upgrade: Upgrade):
        
        key = upgrade.key
        self._upgrades[key] = upgrade
        req = upgrade.ledgerRequest()
        if req:
            self.pendRequest(req, key)
        return len(self._pending)
464917
def upgrade(self):
        
        warn('Upgrading ' + self.filename)
        if self.backup_config(self.filename):
            return self.write_default_config(self.filename)
        return False
469171
def check(self):
        
        current = self._get_current()
        highest = self._get_highest_version()
        return highest > current
1029025
def check_index(self, key, *, index):
        
        self.append({
            "Verb": "check-index",
            "Key": key,
            "Index": extract_attr(index, keys=["ModifyIndex", "Index"])
        })
        return self
667596
def db_version(conn, pkg_name='openquake.server.db.schema.upgrades'):
    
    upgrader = UpgradeManager.instance(conn, pkg_name)
    return max(upgrader.get_db_versions(conn))
303788
def last_updated(self):
        '''
        
        '''
        derived_path = self.context.request.url
        timestamp_key = self.timestamp_key_for(derived_path)

        if self.exists(self.timestamp_key_for, derived_path):
            return self.storage.get(timestamp_key)

        return None
16993
def _update(self, **kwargs):
        
        updated = False
        if 'proxy_server' in kwargs:
            proxy_server = kwargs.get('proxy_server')
            if not proxy_server and self._inspected_service_ref:
                self.protocol_agent_values.pop('inspected_service_ref', None)
                updated = True
            elif isinstance(proxy_server, ProxyServer):
                # Need the inspected service reference for the protocol
                enabled_services = {svc.name:svc.href for svc in proxy_server.inspected_services}
                
                if self.protocol_agent.name not in enabled_services:
                    raise MissingDependency('The specified ProxyServer %r does not enable '
                        'the required protocol %s' % (proxy_server.name, self.protocol_agent.name))
                
                if self._inspected_service_ref != enabled_services.get(self.protocol_agent.name):
                    self.protocol_agent_values['inspected_service_ref'] = enabled_services.get(
                        self.protocol_agent.name)
                    updated = True
        return updated
954295
def _check_index(self):
        """"""
        assert 0 <= self._index <= len(self._history) - 1
        # There should always be the base item at least.
        assert len(self._history) >= 1
173399
def pyLuceneIndexer4to5(old):
    
    new = old.upgradeVersion(PyLuceneIndexer.typeName, 4, 5,
                             indexCount=old.indexCount,
                             installedOn=old.installedOn,
                             indexDirectory=old.indexDirectory)
    new.reset()
    new.store.powerUp(new, ixmantissa.IFulltextIndexer)
    return new