/** * Processes the current event queue. May return boolean false if it is unable to continue. * * @return bool */ protected function do_processing() { // Bail out if the batch limit has been exceeded, if nothing is waiting in the queue // or the queue is actively being processed by a concurrent request/scheduled task if ($this->batch_complete() || !$this->get_current_queue() || $this->current_queue->is_in_progress()) { return false; } $this->current_queue->set_in_progress_flag(); $this->do_deletions(); $this->do_creations(); $this->do_updates(); $this->current_queue->save(); $this->current_queue->clear_in_progress_flag(); return true; }