요청 관리 검색 추가
This commit is contained in:
@@ -5,6 +5,7 @@ import com.eactive.testmaster.loadtest.service.Console;
|
||||
import com.eactive.testmaster.queue.entity.QueueHandler;
|
||||
import com.hazelcast.collection.IQueue;
|
||||
import com.hazelcast.core.HazelcastInstance;
|
||||
import com.hazelcast.core.HazelcastInstanceNotActiveException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@@ -66,11 +67,19 @@ public class QueueListenerService {
|
||||
private void processQueueItems() {
|
||||
while (running.get()) {
|
||||
try {
|
||||
// Use take() instead of poll() to block until an item is available
|
||||
// Optionally check if Hazelcast is still running
|
||||
if (!hazelcastInstance.getLifecycleService().isRunning()) {
|
||||
logger.info("Hazelcast instance is inactive. Stopping queue listener.");
|
||||
break;
|
||||
}
|
||||
// Blocking call: will throw if Hazelcast is shut down
|
||||
Object item = taskQueue.take();
|
||||
processItem(item);
|
||||
} catch (HazelcastInstanceNotActiveException ex) {
|
||||
// Hazelcast has been shut down, so exit the loop gracefully.
|
||||
logger.info("Hazelcast instance not active. Exiting queue listener.");
|
||||
break;
|
||||
} catch (InterruptedException e) {
|
||||
// Handle interruption (likely from shutdown)
|
||||
logger.info("Queue listener interrupted, ending processing");
|
||||
Thread.currentThread().interrupt();
|
||||
break;
|
||||
@@ -82,6 +91,7 @@ public class QueueListenerService {
|
||||
}
|
||||
|
||||
|
||||
|
||||
private void processItem(Object message) {
|
||||
|
||||
String script = queueHandler.getHandlerScript();
|
||||
|
||||
@@ -879,7 +879,7 @@ li.selected {
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.fullHeight {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -89,9 +89,12 @@
|
||||
let scriptEditor;
|
||||
|
||||
require(['vs/editor/editor.main'], function () {
|
||||
const defaultScript = `function processJson(message) {
|
||||
//process message;
|
||||
const defaultScript = `function processMessage(message, serviceId) {
|
||||
// Process the message and serviceId
|
||||
console.log("Received message:", message);
|
||||
console.log("Service ID:", serviceId);
|
||||
|
||||
// Return response
|
||||
return "response_message";
|
||||
}`;
|
||||
scriptEditor = monaco.editor.create(document.getElementById('script_editor'), {
|
||||
|
||||
@@ -10,6 +10,18 @@
|
||||
<div style="background: rgba(0,0,0,.03);">
|
||||
API 목록
|
||||
</div>
|
||||
<div class="search-container p-2">
|
||||
<div class="input-group">
|
||||
<span class="input-group-text">
|
||||
<i class="fa fa-search"></i>
|
||||
</span>
|
||||
<input type="text"
|
||||
id="api_search"
|
||||
class="form-control form-control-sm"
|
||||
placeholder="컬렉션/API 검색..."
|
||||
aria-label="Search collections and APIs">
|
||||
</div>
|
||||
</div>
|
||||
<div class="pt-links" aria-label="sidebar menu">
|
||||
<ul class="list-unstyled" id="side_menubar">
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user