Start an interval to refresh the weather cache data with new server data.
179385
function startRefreshWeather() {
      interval = $interval(getWeatherFromServer(options.city), options.delay);
      localforage.setItem('aw.refreshing', true);
    }
1031356
def start(self, interval):
        """"""
        if self._thread:
            self.cancel()
        self._event.clear()
        self._thread = hub.spawn(self._timer, interval)
876663
def set_data(self, data):
        """"""
        for key, val in data.items():
            setattr(self, key, val)
        self.uptime['reloaded'] = datetime.now()
1077701
def refresh(self):
    """"""
    if self.status == 'executing' and self.array:
      new_result = 0
      for array_job in self.array:
        if array_job.status == 'failure' and new_result is not None:
          new_result = array_job.result
        elif array_job.status not in ('success', 'failure'):
          new_result = None
      if new_result is not None:
        self.status = 'success' if new_result == 0 else 'failure'
        self.result = new_result
219839
def set_refresh_interval(self, seconds, **kwargs):
        
        if seconds <= 0:
            interval = -1
        else:
            interval = text_type(seconds) + "s"

        if self.cluster.version.startswith("0.90."):
            response = self.cluster.put(
                "/" + self.settings.index + "/_settings",
                data='{"index":{"refresh_interval":' + value2json(interval) + '}}',
                **kwargs
            )

            result = json2value(utf82unicode(response.all_content))
            if not result.ok:
                Log.error("Can not set refresh interval ({{error}})", {
                    "error": utf82unicode(response.all_content)
                })
        elif self.cluster.version.startswith(("1.4.", "1.5.", "1.6.", "1.7.", "5.", "6.")):
            result = self.cluster.put(
                "/" + self.settings.index + "/_settings",
                data={"index": {"refresh_interval": interval}},
                **kwargs
            )

            if not result.acknowledged:
                Log.error("Can not set refresh interval ({{error}})", {
                    "error": result
                })
        else:
            Log.error("Do not know how to handle ES version {{version}}", version=self.cluster.version)
1330166
public void start() {
    //only start the thread if the interval is sane
    if(refreshInterval > 0) {
      refreshUsed = new Thread(new DURefreshThread(), 
          "refreshUsed-"+dirPath);
      refreshUsed.setDaemon(true);
      refreshUsed.start();
    }
  }
273365
def update_continuously(records, update_interval=600):
    """"""
    while True:
        for record in records:
            try:
                record.update()
            except (ApiError, RequestException):
                pass
        time.sleep(update_interval)
113569
def refresh(self, **kwargs):
        """"""
        self.resource.refresh(**kwargs)
        self.rdict = self.resource.entries
        self._update_stats()
580314
function getWeatherFromServer(city) {
      var deferred = $q.defer();
      var url = openweatherEndpoint;
      var params = {
        q: city,
        units: 'metric',
        APPID: Config.openweather.apikey || ''
      };
      $http({
        method: 'GET',
        url: url,
        params: params,
        withoutToken: true,
        cache: true
      }).success(function(data) {
        // Prepare the Weather object.
        var weatherData = prepareWeather(data);
        setCache(weatherData);

        // Start refresh automatic the weather, according the interval of time.
        options.refresh && startRefreshWeather();

        deferred.resolve(weatherData);
      });

      return deferred.promise;
    }
1102812
function (interval, user) {
		interval = interval || 2000;

		this._user = user || (new Date()).valueOf();
		this._need_update = false;
		//this._loader = null;
		this._update_busy = false;

		this.attachEvent("onAfterUpdate", function (sid, action, tid, xml_node) {
			this.afterAutoUpdate(sid, action, tid, xml_node);
		});
		this.attachEvent("onFullSync", function () {
			this.fullSync();
		});

		var self = this;
		window.setInterval(function () {
			self.loadUpdate();
		}, interval);
	}
857143
def refresh(self):
        """"""
        client = self._get_client()
        endpoint = self._endpoint.format(
            resource_id=self.resource_id or "",
            parent_id=self.parent_id or "",
            grandparent_id=self.grandparent_id or "")
        response = client.get_resource(endpoint)
        self._reset_model(response)
976954
def refresh_interval(self, refresh_interval):
        
        if isinstance(refresh_interval, int) and refresh_interval > 0:
            self._refresh_interval = refresh_interval
        else:
            self._refresh_interval = None
1050096
private void mkRefreshConfThread(final NimbusData nimbusData) {
        nimbusData.getScheduExec().scheduleAtFixedRate(new RunnableCallback() {
            @Override
            public void run() {
                LOG.debug("checking changes in storm.yaml...");

                Map newConf = Utils.readStormConfig();
                if (Utils.isConfigChanged(nimbusData.getConf(), newConf)) {
                    LOG.warn("detected changes in storm.yaml, updating...");
                    synchronized (nimbusData.getConf()) {
                        nimbusData.getConf().clear();
                        nimbusData.getConf().putAll(newConf);
                    }

                    RefreshableComponents.refresh(newConf);
                } else {
                    LOG.debug("no changes detected, stay put.");
                }
            }

            @Override
            public Object getResult() {
                return 15;
            }
        }, 15, 15, TimeUnit.SECONDS);

        LOG.info("Successfully init configuration refresh thread");
    }
544600
private function refresh(): void
    {
        $time = \time();

        if (isset($this->data['time']) && $this->data['time'] <= ($time - $this->expire)) {

            //delete session data
            $this->data = [];

            //regenerate session
            $this->regenerate();
        }

        $this->setSessionData($time);
    }
266055
public function refresh()
    {
        $this->_response = $this->_client->requestEndpoint(new State());
        $this->_data = $this->getResponse()->getData();
    }
935183
public function refreshInstance()
  {
    $this->counter    = 0;
    $this->startedAt  = microtime(true);
    $this->expiresAt  = $this->computeExpiration();
    $this->setUpComponents($this->components);
  }
111731
def refresh(self):
        
        super(Habitat, self).update(self.get_environ(self._prefix))