Code Duplication    Length = 9-9 lines in 2 locations

lib/Service/QueueService.php 2 locations

@@ 113-121 (lines=9) @@
110
	 *
111
	 * @return mixed
112
	 */
113
	public function countMessages() {
114
		try {
115
			$stats = msg_stat_queue($this->queue);
116
			$this->logger->debug('Current message count: ' . json_encode($stats['msg_qnum']), ['app' => 'ocr']);
117
			return $stats['msg_qnum'];
118
		} catch (Exception $e) {
119
			$this->handleException($e);
120
		}
121
	}
122
123
	/**
124
	 * TODO: in the future this function could be used to give an admin information
@@ 129-137 (lines=9) @@
126
	 *
127
	 * @return mixed
128
	 */
129
	public function countActiveProcesses() {
130
		try {
131
			$stats = msg_stat_queue($this->statusqueue);
132
			$this->logger->debug('Current active processing count: ' . json_encode($stats['msg_qnum']), ['app' => 'ocr']);
133
			return $stats['msg_qnum'];
134
		} catch (Exception $e) {
135
			$this->handleException($e);
136
		}
137
	}
138
139
	/**
140
	 * Handle the possible thrown Exceptions from all methods of this class.