[BUG] process_queue silently skips all queue items due to missing closing parentheses #142

Closed
opened 2026-04-05 08:39:17 +02:00 by shoko · 0 comments
Owner

Bug: process_queue silently skips all queue items due to missing closing parentheses in Python extraction commands

Severity: High - queue daemon processes 0 tasks indefinitely

Description:
Two Python commands in process_queue() that extract issue_ref and message from queue JSON files have syntax errors — missing closing parenthesis.

The Python call has get('issue_ref', '') but only opens 1 parenthesis total - should be )) to close both json.load() and get(). The error is silently swallowed by 2>/dev/null, so both variables end up empty and every queue item is skipped at the empty check.

Location: process_queue() function, around lines 675-676

Broken:
local issue_ref=$(python3 -c "import json; print(json.load(open('$item')).get('issue_ref', '')" 2>/dev/null)

Fix:
local issue_ref=$(python3 -c "import json; print(json.load(open('$item')).get('issue_ref', ''))" 2>/dev/null)

Same fix needed for message extraction on the next line.

Repro:

  1. Set QUEUE_DAEMON_INTERVAL_MINUTES=1 in config
  2. Start queue daemon with kugetsu queue-daemon start
  3. Enqueue a task with kugetsu delegate
  4. Tasks stay in pending state forever - issue_ref and message come back empty
**Bug: process_queue silently skips all queue items due to missing closing parentheses in Python extraction commands** **Severity:** High - queue daemon processes 0 tasks indefinitely **Description:** Two Python commands in process_queue() that extract issue_ref and message from queue JSON files have syntax errors — missing closing parenthesis. The Python call has `get('issue_ref', '')` but only opens 1 parenthesis total - should be `))` to close both json.load() and get(). The error is silently swallowed by 2>/dev/null, so both variables end up empty and every queue item is skipped at the empty check. **Location:** process_queue() function, around lines 675-676 **Broken:** local issue_ref=$(python3 -c "import json; print(json.load(open('$item')).get('issue_ref', '')" 2>/dev/null) **Fix:** local issue_ref=$(python3 -c "import json; print(json.load(open('$item')).get('issue_ref', ''))" 2>/dev/null) Same fix needed for message extraction on the next line. **Repro:** 1. Set QUEUE_DAEMON_INTERVAL_MINUTES=1 in config 2. Start queue daemon with kugetsu queue-daemon start 3. Enqueue a task with kugetsu delegate 4. Tasks stay in pending state forever - issue_ref and message come back empty
shoko added the high label 2026-04-05 08:39:17 +02:00
shoko closed this issue 2026-04-05 08:56:59 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#142