Synchronize snapserver.
326619
def synchronize(self, status):
        """"""
        self._version = status.get('server').get('version')
        self._groups = {}
        self._clients = {}
        self._streams = {}
        for stream in status.get('server').get('streams'):
            self._streams[stream.get('id')] = Snapstream(stream)
            _LOGGER.debug('stream found: %s', self._streams[stream.get('id')])
        for group in status.get('server').get('groups'):
            self._groups[group.get('id')] = Snapgroup(self, group)
            _LOGGER.debug('group found: %s', self._groups[group.get('id')])
            for client in group.get('clients'):
                self._clients[client.get('id')] = Snapclient(self, client)
                _LOGGER.debug('client found: %s', self._clients[client.get('id')])
1364710
protected function synchronize()
	{
		if( file_exists( $this->syncFile ) )
		{
			$time	= filemtime( $this->syncFile );
			if( ( time() - $time ) < $this->refreshTime )
			{
				$this->syncTime	= $time;
				$this->syncDiff	= FS_File_Reader::load( $this->syncFile );
				return;
			}
		}
		$this->syncTime	= time();
		$this->syncDiff	= $this->syncTime - Net_AtomTime::getTimestamp();
		FS_File_Writer::save( $this->syncFile, $this->syncDiff );
		touch( $this->syncFile );
	}
1248266
def sync(self):
        """"""
        self.elk.send(ka_encode())
        self.get_descriptions(TextDescriptions.KEYPAD.value)
160519
def snapshot(self):
        """"""
        self._snapshot = {
            'name': self.name,
            'volume': self.volume,
            'muted': self.muted,
            'latency': self.latency
        }
        _LOGGER.info('took snapshot of current state of %s', self.friendly_name)
1041774
def sync(self):
        """"""
        if self.writeback and self.cache:
            super(_TimeoutMixin, self).__delitem__(self._INDEX)
            super(_TimeoutMixin, self).sync()
            self.writeback = False
            super(_TimeoutMixin, self).__setitem__(self._INDEX, self._index)
            self.writeback = True
        if hasattr(self.dict, 'sync'):
            self.dict.sync()
966300
def handle_syncing(node, snapshots)
      reconcile(node)

      if node.syncing_with_master? && node.prohibits_stale_reads?
        logger.info("Node #{node} not ready yet, still syncing with master.")
        force_unavailable_slave(node)
      else
        # otherwise, we can use this node
        handle_available(node, snapshots)
      end
    end
437398
def hold_sync(self):
        """"""
        if self._holding_sync is True:
            yield
        else:
            try:
                self._holding_sync = True
                yield
            finally:
                self._holding_sync = False
                self.send_state(self._states_to_send)
                self._states_to_send.clear()
737693
function(snap) {
          var model = Backbone.Firebase._checkId(snap);

          if (this._suppressEvent === true) {
            this._suppressEvent = false;
            Backbone.Collection.prototype.remove.apply(
              this, [model], {silent: true}
            );
          } else {
            // trigger sync because data has been received from the server
            this.trigger('sync', this);
            Backbone.Collection.prototype.remove.apply(this, [model]);
          }
        }
415427
function syncCurrentBackendInfo(projectInfo, backendDetails, awsDetails, callback){
    let appsyncInfo = appsyncManager.getAppSyncInfo(projectInfo.ProjectPath)
    if(appsyncInfo && appsyncInfo.apiId){
        return appsyncRetrieve.run(projectInfo, awsDetails).then(()=>{
            if(callback){
                callback()
            }
        })
    }else{
        if(callback){
            callback()
        }
    }
}
365426
def __sync(self):
    """"""
    pad_length = _BLOCK_SIZE - self.__reader.tell() % _BLOCK_SIZE
    if pad_length and pad_length != _BLOCK_SIZE:
      data = self.__reader.read(pad_length)
      if len(data) != pad_length:
        raise EOFError('Read %d bytes instead of %d' %
                       (len(data), pad_length))
249162
async def synchronize(self, pid, vendor_specific=None):
        """"""
        return await self._request_pyxb(
            "post",
            ["synchronize", pid],
            {},
            mmp_dict={"pid": pid},
            vendor_specific=vendor_specific,
        )
86006
def _sync_projects(self, projects_json):
        """""""
        for project_json in projects_json:
            project_id = project_json['id']
            self.projects[project_id] = Project(project_json, self)
30686
def _sync(pack):
    """"""
    task_queue = Queue()
    result_queue = Queue()
    task = SignedPackage.loads(pack)
    task_queue.put(task)
    task_queue.put('STOP')
    worker(task_queue, result_queue, Value('f', -1))
    result_queue.put('STOP')
    monitor(result_queue)
    task_queue.close()
    task_queue.join_thread()
    result_queue.close()
    result_queue.join_thread()
    return task['id']
971337
def synchronised(func):
        """"""

        # pylint: disable=E0213
        def Wrapper(main_obj, *args, **kwargs):
            main_obj._lock.acquire()  # pylint: disable=W0212
            try:
                return func(main_obj, *args, **kwargs)  # pylint: disable=E1102
            finally:
                main_obj._lock.release()  # pylint: disable=W0212

        return Wrapper
337983
function Snaps (client, opts) {
  var self = this
  if (!(self instanceof Snaps)) return new Snaps(client, opts)
  if (!opts) opts = {}

  self.client = client
}
1241608
def sync(self):
        """"""
        self.elk.send(as_encode())
        self.get_descriptions(TextDescriptions.AREA.value)
778520
def _work(self):
        """"""
        server = wsgi.Server(
            name=self._AGENT_BINARY,
            num_threads=CONF.AGENT.worker_count)
        server.start(
            application=_MetadataProxyHandler(),
            port=CONF.bind_port,
            host=CONF.bind_host)
        server.wait()