Code Duplication    Length = 9-9 lines in 2 locations

lib/Service/QueueService.php 2 locations

@@ 80-88 (lines=9) @@
77
     *
78
	 * @return mixed
79
	 */
80
	public function countMessages() {
81
		try {
82
			$stats = msg_stat_queue($this->queue);
83
			$this->logger->debug('Current message count: ' . json_encode($stats['msg_qnum']), ['app' => 'ocr']);
84
			return $stats['msg_qnum'];
85
		} catch (Exception $e) {
86
			$this->handleException($e);
87
		}
88
	}
89
90
    /**
91
     * TODO: in the future this function could be used to give an admin information
@@ 96-104 (lines=9) @@
93
     *
94
     * @return mixed
95
     */
96
    public function countActiveProcesses() {
97
		try {
98
			$stats = msg_stat_queue($this->statusqueue);
99
			$this->logger->debug('Current active processing count: ' . json_encode($stats['msg_qnum']), ['app' => 'ocr']);
100
			return $stats['msg_qnum'];
101
		} catch (Exception $e) {
102
			$this->handleException($e);
103
		}
104
	}
105
106
	/**
107
	 * Handle the possible thrown Exceptions from all methods of this class.