Refresh druid datasources
165797
def refresh_druid(datasource, merge):
    """"""
    session = db.session()
    from superset.connectors.druid.models import DruidCluster
    for cluster in session.query(DruidCluster).all():
        try:
            cluster.refresh_datasources(datasource_name=datasource,
                                        merge_flag=merge)
        except Exception as e:
            print(
                "Error while processing cluster '{}'\n{}".format(
                    cluster, str(e)))
            logging.exception(e)
        cluster.metadata_last_refreshed = datetime.now()
        print(
            'Refreshed metadata from cluster '
            '[' + cluster.cluster_name + ']')
    session.commit()
68598
def refresh_token(self, subid):
    ''''''
    from expfactory.database.models import Participant
    p = Participant.query.filter(Participant.id == subid).first()
    if p is not None:
        p.token = str(uuid.uuid4())
    self.session.commit()
    return p
1012921
private void onDataSetModifiedEvent(@Observes DataSetModifiedEvent event) {
        if (!editOn) {

            String targetUUID = event.getDataSetDef().getUUID();
            for (Displayer displayer : displayerCoordinator.getDisplayerList()) {
                DisplayerSettings settings = displayer.getDisplayerSettings();

                // Do nothing if the displayer:
                // - Is not drawn
                // - Is handling the refresh by itself
                // - Is not configured to be updated on stale data
                if (!displayer.isDrawn() || displayer.isRefreshOn() || !settings.isRefreshStaleData()) {
                    continue;
                }

                String uuid = null;
                DataSet dataSet = settings.getDataSet();
                if (dataSet != null) {
                    uuid = dataSet.getUUID();
                }
                DataSetLookup dataSetLookup = settings.getDataSetLookup();
                if (uuid == null && dataSetLookup != null) {
                    uuid = dataSetLookup.getDataSetUUID();
                }
                if (uuid != null && targetUUID.equals(uuid)) {
                    displayer.redraw();
                }
            }
        }
    }
798683
def refreshQueryRecords(self):
        
        if self._recordSet is not None:
            records = RecordSet(self._recordSet)
        elif self.tableType():
            records = self.tableType().select()
        else:
            return
        
        records.setDatabase(self.database())
        
        # replace the base query with this widget
        if self.queryAction() == XOrbTreeWidget.QueryAction.Replace:
            if self.query():
                records.setQuery(self.query())
            else:
                records.setQuery(None)
        
        # join together the query for this widget
        elif self.queryAction() == XOrbTreeWidget.QueryAction.Join:
            if records.query():
                records.setQuery(self.query() & self.query())
            elif self.query():
                records.setQuery(self.query())
            else:
                records.setQuery(None)
        
        self._recordSet = records
        
        if not self.signalsBlocked():
            self.queryChanged.emit()
            self.recordsChanged.emit()
1100188
def _trigger_refresh(self, key):
        ""
        # Update if not top-level, batched or an ElementPlot
        if not self.top_level or isinstance(self, GenericElementPlot):
            self.update(key)
592689
def refresh(self):
        # type: () -> None
        """"""
        from pykechain.client import API_EXTRA_PARAMS
        src = self._client.reload(self, extra_params=API_EXTRA_PARAMS['activity'])
        self.__dict__.update(src.__dict__)
930770
async def _refresh_table(self):
        
        results = []
        for node_id in self.protocol.get_refresh_ids():
            node = Node(node_id)
            nearest = self.protocol.router.find_neighbors(node, self.alpha)
            spider = NodeSpiderCrawl(self.protocol, node, nearest,
                                     self.ksize, self.alpha)
            results.append(spider.find())

        # do our crawling
        await asyncio.gather(*results)

        # now republish keys older than one hour
        for dkey, value in self.storage.iter_older_than(3600):
            await self.set_digest(dkey, value)
427168
def __refresh(self):
        """"""
        raw_values = self.__get_values()
        if not raw_values:
            raise RefreshException('Point has no values')

        # individual templates
        templates = []
        # lookup tables by type and unit of value
        by_type = {}
        by_unit = {}

        for raw_value in raw_values:
            label = raw_value['label']
            if not valid_identifier(label) or label.startswith('__'):
                raise RefreshException('Value "%s" unsuitable for object wrapper' % label)
            value = Value(label, raw_value['type'], raw_value['unit'], raw_value['comment'])
            templates.append(value)
            try:
                by_type[value.type_].add(label)
            except KeyError:
                by_type[value.type_] = {label}
            if value.unit:
                try:
                    by_unit[value.unit].add(label)
                except KeyError:
                    by_unit[value.unit] = {label}

        self.__value_templates = templates
        self.__filter = _ValueFilter(by_type, by_unit)
67009
def do_refresh(self,args):
        """"""
        print "stackResource: {}".format(self.stackResource)
        
        self.roleDetails = AwsConnectionFactory.getIamClient().get_role(RoleName=self.stackResource.physical_resource_id)
        print "== role details =="
        pprint(self.roleDetails)

        self.rolePolicies = self.loadRolePolicies()
        print "== attached policies =="
        pprint(self.rolePolicies)
795803
async def refresh(self):
        """"""
        cls = type(self)
        if hasattr(cls, 'read'):
            descriptors, alt_descriptors = get_pk_descriptors(cls)
            if len(descriptors) == 1:
                try:
                    obj = await cls.read(getattr(self, descriptors[0][0]))
                except AttributeError:
                    found = False
                    for alt_name, _ in alt_descriptors[0]:
                        if hasattr(self, alt_name):
                            obj = await cls.read(getattr(self, alt_name))
                            found = True
                            break
                    if not found:
                        raise
            elif len(descriptors) > 1:
                args = []
                for idx, (name, _) in enumerate(descriptors):
                    try:
                        args.append(getattr(self, name))
                    except AttributeError:
                        found = False
                        for alt_name, _ in alt_descriptors[idx]:
                            if hasattr(self, alt_name):
                                args.append(getattr(self, alt_name))
                                found = True
                                break
                        if not found:
                            raise
                obj = await cls.read(*args)
            else:
                raise AttributeError(
                    "unable to perform 'refresh' no primary key "
                    "fields defined.")
            if type(obj) is cls:
                self._data = obj._data
                self._loaded = True
            else:
                raise TypeError(
                    "result of '%s.read' must be '%s', not '%s'" % (
                        cls.__name__, cls.__name__, type(obj).__name__))
        else:
            raise AttributeError(
                "'%s' object doesn't support refresh." % cls.__name__)
155347
def refresh(self):
        # type: () -> None
        """"""
        src = self._client.reload(self)
        self.__dict__.update(src.__dict__)
241498
def Refresh(self):
		

		self.dirty = False
		self.data = clc.v2.API.Call('GET','groups/%s/%s' % (self.alias,self.id), session=self.session)

		self.data['changeInfo']['createdDate'] = clc.v2.time_utils.ZuluTSToSeconds(self.data['changeInfo']['createdDate'])
		self.data['changeInfo']['modifiedDate'] = clc.v2.time_utils.ZuluTSToSeconds(self.data['changeInfo']['modifiedDate'])
831501
def refresh_db(root=None):
    '''
    
    '''
    # Remove rtag file to keep multiple refreshes from happening in pkg states
    salt.utils.pkg.clear_rtag(__opts__)
    ret = {}
    out = __zypper__(root=root).refreshable.call('refresh', '--force')

    for line in out.splitlines():
        if not line:
            continue
        if line.strip().startswith('Repository') and '\'' in line:
            try:
                key = line.split('\'')[1].strip()
                if 'is up to date' in line:
                    ret[key] = False
            except IndexError:
                continue
        elif line.strip().startswith('Building') and '\'' in line:
            key = line.split('\'')[1].strip()
            if 'done' in line:
                ret[key] = True
    return ret
533003
def refresh(self, updated_self):

		'''
		
		'''

		logger.debug('refreshing binary attributes')
		self.mimetype = updated_self.binary.mimetype
		self.data = updated_self.binary.data
891985
function refresh() {
        $this->client = new $this->clientClassName($this->accessToken, $this->spaceId, $this->cacher);
        $this->requestDecorator = new RequestDecorator();
        $this->requestDecorator->setResource($this->resourceName);
    }
1192059
def refresh(self):
        """"""
        d = self.request('get', self.instance_url())
        return d.addCallback(self.refresh_from).addCallback(lambda _: self)
395435
def refresh(self):
        """"""
        if self.refresh_token is None:
            raise InvalidInvocation("refresh token not provided")
        self._request_token(
            grant_type="refresh_token", refresh_token=self.refresh_token
        )