#507 SonarQube blocker severity bugs
This commit is contained in:
@ -35,27 +35,27 @@ import org.slf4j.LoggerFactory;
|
||||
public class ServiceExecutor implements Runnable {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||
|
||||
|
||||
private final MessageQueue msgQueue;
|
||||
|
||||
public ServiceExecutor(MessageQueue msgQueue) {
|
||||
this.msgQueue = msgQueue;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The ServiceExecutor thread will retrieve each message and process it.
|
||||
*/
|
||||
public void run() {
|
||||
try {
|
||||
while (true) {
|
||||
while (!Thread.currentThread().isInterrupted()) {
|
||||
Message msg = msgQueue.retrieveMsg();
|
||||
|
||||
|
||||
if (null != msg) {
|
||||
LOGGER.info(msg.toString() + " is served.");
|
||||
} else {
|
||||
LOGGER.info("Service Executor: Waiting for Messages to serve .. ");
|
||||
}
|
||||
|
||||
|
||||
Thread.sleep(1000);
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
|
Reference in New Issue
Block a user