Refresh index for given resource.

        :param resource: resource name
329222
def _refresh_resource_index(self, resource):
        
        if self._resource_config(resource, 'FORCE_REFRESH', True):
            self.elastic(resource).indices.refresh(self._resource_index(resource))
1070529
def group_refresh(name, **kwargs):
    
    ctx = Context(**kwargs)
    ctx.execute_action('group:refresh', **{
        'locator': ctx.locator,
        'storage': ctx.repo.create_secure_service('storage'),
        'name': name,
    })
1165860
def _trigger_refresh(self, key):
        ""
        if self.top_level:
            self.update(key)
        else:
            self.current_key = None
            self.current_frame = None
1242842
def refresh(self, serviceDefinition=True):
        
        url = self._url + "/MapServer/refresh"
        params = {
            "f" : "json",
            "serviceDefinition" : serviceDefinition
        }

        res =  self._post(url=self._url,
                             param_dict=params,
                             securityHandler=self._securityHandler,
                             proxy_url=self._proxy_url,
                             proxy_port=self._proxy_port)
        self.__init()
        return res
328083
def refresh(self, datasource_names, merge_flag, refreshAll):
        
        session = db.session
        ds_list = (
            session.query(DruidDatasource)
            .filter(DruidDatasource.cluster_name == self.cluster_name)
            .filter(DruidDatasource.datasource_name.in_(datasource_names))
        )
        ds_map = {ds.name: ds for ds in ds_list}
        for ds_name in datasource_names:
            datasource = ds_map.get(ds_name, None)
            if not datasource:
                datasource = DruidDatasource(datasource_name=ds_name)
                with session.no_autoflush:
                    session.add(datasource)
                flasher(
                    _('Adding new datasource [{}]').format(ds_name), 'success')
                ds_map[ds_name] = datasource
            elif refreshAll:
                flasher(
                    _('Refreshing datasource [{}]').format(ds_name), 'info')
            else:
                del ds_map[ds_name]
                continue
            datasource.cluster = self
            datasource.merge_flag = merge_flag
        session.flush()

        # Prepare multithreaded executation
        pool = ThreadPool()
        ds_refresh = list(ds_map.values())
        metadata = pool.map(_fetch_metadata_for, ds_refresh)
        pool.close()
        pool.join()

        for i in range(0, len(ds_refresh)):
            datasource = ds_refresh[i]
            cols = metadata[i]
            if cols:
                col_objs_list = (
                    session.query(DruidColumn)
                    .filter(DruidColumn.datasource_id == datasource.id)
                    .filter(DruidColumn.column_name.in_(cols.keys()))
                )
                col_objs = {col.column_name: col for col in col_objs_list}
                for col in cols:
                    if col == '__time':  # skip the time column
                        continue
                    col_obj = col_objs.get(col)
                    if not col_obj:
                        col_obj = DruidColumn(
                            datasource_id=datasource.id,
                            column_name=col)
                        with session.no_autoflush:
                            session.add(col_obj)
                    col_obj.type = cols[col]['type']
                    col_obj.datasource = datasource
                    if col_obj.type == 'STRING':
                        col_obj.groupby = True
                        col_obj.filterable = True
                datasource.refresh_metrics()
        session.commit()
1094674
def _update_index(self):
         
        d = self.declaration
        self.index = self.view.model.index(d.row, d.column)
        if self.delegate:
            self._refresh_count += 1
            timed_call(self._loading_interval, self._update_delegate)
599484
def refreshFromIndex( self ):
        
        item = self.uiIndexTREE.currentItem()
        if ( not item ):
            return
        
        self.gotoUrl(item.toolTip(0))
312145
def index():
    
    # Reset current index values when the page is refreshed
    for k, v in current_index.items():
        current_index[k] = 0

    logging.info("Dashboard refreshed")

    # render the template (below) that will use JavaScript to read the stream
    return render_template("crystal_dashboard.html")
242109
def refresh(self, *args, **kwargs):
        
        result = self.fetch(*args, **kwargs)
        self.store(self.key(*args, **kwargs), self.expiry(*args, **kwargs), result)
        return result
294878
def update_resource(resource, incoming_request):
    
    resource.from_dict(get_resource_data(incoming_request))
    _perform_database_action('merge', resource)
    return no_content_response()
349671
def get_index_url(self, resource=None, **kwargs):
        
        default_kwargs = self.default_kwargs_for_urls() \
            if resource == self.get_resource_name() else {}

        default_kwargs.update(kwargs)

        return self.get_full_url(
            self.app.reverse(
                '{}_index'.format(resource or self.get_resource_name()),
                **default_kwargs
            )
        )
1280513
def reload(self):
        

        result = self._client._get(
            self.__class__.base_url(
                self.sys['id']
            )
        )

        self._update_from_resource(result)

        return self
1018267
def refresh(self):
        
        table   = self.tableType()
        search  = nativestring(self._pywidget.text())
        if search == self._lastSearch:
            return
        
        self._lastSearch = search
        if not search:
            return
        
        if search in self._cache:
            records = self._cache[search]
        else:
            records = table.select(where = self.baseQuery(),
                                   order = self.order())
            records = list(records.search(search, limit=self.limit()))
            self._cache[search] = records
        
        self._records = records
        self.model().setStringList(map(str, self._records))
        self.complete()
404992
def update_resources(self, cpu, gpu, **kwargs):
        
        if self.status is Trial.RUNNING:
            raise ValueError("Cannot update resources while Trial is running.")
        self.resources = Resources(cpu, gpu, **kwargs)
32485
function refreshSourceRow (target, source) {
        var row = upToSourceRow(target),
            newRow = rowFactory(source, source.getIndex());
        sourceRows.replaceChild(newRow, row);
        updateSourceRow(source);
    }
877174
def open_resource(self, resource, *mode):
        
        return self.open(self.resource_name(resource), *mode)
1374532
def update_port_monitor(self, resource, timeout=-1):
        
        data = resource.copy()
        if 'type' not in data:
            data['type'] = 'port-monitor'

        uri = "{}{}".format(self.data["uri"], self.PORT_MONITOR_PATH)
        return self._helper.update(data, uri=uri, timeout=timeout)