Processes queued item of type push
968946
def process_push
      factory = "::#{object_type}".constantize
      local_object = factory.find(object_local_id)
      syncer = factory.synchronizer
      syncer.push_object(local_object)
      
      self.state = 'done'
      self.save
    end
1207073
function processQueue(){
      try {
        // mark queue as processing to avoid concurrency
        processing = true;

        // process queue
        var item;
        while (item = queue.shift())
          item.fn.call(item.context);
      } finally {
        // queue is not processing anymore
        processing = false;

        // if any function in queue than exception was occured,
        // run rest functions in next code frame
        if (queue.length)
          timer = setImmediate(process);
      }
    }
923033
def put(self, item, block=True, timeout=None):
        """"""
        return self._queue.put(item, block, timeout)
109352
function pushEdit (edits, item, added, removed) {
  var last = edits[edits.length - 1]

  if (last && last.added === added && last.removed === removed) {
    last.items.unshift(item) // Not push: edits get reversed later
  } else {
    edits.push({
      items: [item],
      added: added,
      removed: removed
    })
  }
}
156003
function enqueue(queue, update) {
  if (update) {
    queue = queue || [];
    queue.push(update);
  }
  return queue;
}
664466
def process(data)
      message = MultiJson.load(data, symbolize_keys: true)
      event   = message[:event]

      PusherFake.log("RECV #{id}: #{message}")

      if event.start_with?(CLIENT_EVENT_PREFIX)
        process_trigger(event, message)
      else
        process_event(event, message)
      end
    end
218534
def process(self, event):
        
        logger.info(f"{self}: put {event.src_path}")
        self.queue.put(os.path.basename(event.src_path))
51892
def _push_packet(self, packet):
        
        self._read_queue.append((decode(packet), packet))

        if self._read_waiter is not None:
            w, self._read_waiter = self._read_waiter, None
            w.set_result(None)
1000731
def _reverse_queue(self):
        
        """

        while self.pool:
            item = self.pool.pop()
            self.queue.put(item, block=False)
344940
def push(self, *items):
        
        if self.serialized:
            items = list(map(self._dumps, items))
        return self._client.lpush(self.key_prefix, *items)
61778
def PushItem(self, item, block=True):
    
    try:
      self._queue.put(item, block=block)
    except Queue.Full as exception:
      raise errors.QueueFull(exception)
1244433
def _push_next(self):
        """"""
        r = next(self._iter, None)
        if r is None:
            return
        async_ret = self._worker_pool.apply_async(
            self._worker_fn, (r, self._batchify_fn, self._dataset))
        self._data_buffer[self._sent_idx] = async_ret
        self._sent_idx += 1
1200681
function(item, callback) {
                if (item.uniqueId != '') {
                    if (hasCache && typeof queueDb == 'object') {
                        queueDb.waitQ
                            .put({
                                threadId: parseInt(item.subjectId),
                                uniqueId: item.uniqueId,
                                owner: parseInt(userInfo.id),
                                message: Utility.crypt(item, cacheSecret)
                            })
                            .then(function() {
                                callback && callback();
                            })
                            .catch(function(error) {
                                fireEvent('error', {
                                    code: error.code,
                                    message: error.message,
                                    error: error
                                });
                            });
                    }
                    else {
                        chatWaitQueue.push(item);
                        callback && callback();
                    }
                }
            }
624202
def _push_next(self):
        """"""
        r = next(self._iter, None)
        if r is None:
            return
        self._key_queue.put((self._sent_idx, r))
        self._sent_idx += 1
1015693
function NativePushQueue(obj) {
  if (!(this instanceof NativePushQueue)) {
    return new NativePushQueue(obj);
  }

  obj = obj || {};

  this.name = obj.name || '';
  this.type = 'push';
  this.queue = obj.queue || null;
}
232605
def heappushpop(heap, item):
    """"""
    if heap and heap[0] < item:
        item, heap[0] = heap[0], item
        _siftup(heap, 0)
    return item
1071389
def _push_from_buffer(self):
        
        if len(self.buffer) > 0:
            if time.time() - self.last_sent_time > 5:
                try:
                    message = self.buffer.pop(0)
                    self.s.send(message.encode('utf-8'))
                    if self.verbose:
                        print(message)
                finally:
                    self.last_sent_time = time.time()