queueueueue
This commit is contained in:
12
agent.py
12
agent.py
@@ -496,6 +496,12 @@ RESPOND WITH ONLY THE JSON, NO OTHER TEXT.
|
||||
# If queue is enabled, submit to queue and wait
|
||||
if self.use_queue and self.ollama_queue:
|
||||
try:
|
||||
# Check if there's already an AUTONOMOUS request pending/processing
|
||||
if self.priority_level.value == 1: # AUTONOMOUS
|
||||
if self.ollama_queue.has_pending_with_priority(self.priority_level):
|
||||
print("[Queue] Skipping request - AUTONOMOUS check already in queue")
|
||||
return "System check already in progress - skipping duplicate request"
|
||||
|
||||
payload = {
|
||||
"model": self.model,
|
||||
"prompt": prompt,
|
||||
@@ -794,6 +800,12 @@ Provide unified summary (max 800 chars) covering all key points."""
|
||||
# Use queue if enabled
|
||||
if self.use_queue and self.ollama_queue:
|
||||
try:
|
||||
# Check if there's already an AUTONOMOUS request pending/processing
|
||||
if self.priority_level.value == 1: # AUTONOMOUS
|
||||
if self.ollama_queue.has_pending_with_priority(self.priority_level):
|
||||
print("[Queue] Skipping request - AUTONOMOUS check already in queue")
|
||||
return "System check already in progress - skipping duplicate request"
|
||||
|
||||
payload = {
|
||||
"model": self.model,
|
||||
"messages": pruned_messages,
|
||||
|
||||
Reference in New Issue
Block a user