Code Duplication    Length = 9-9 lines in 2 locations

lib/Service/QueueService.php 2 locations

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