fix(queue-daemon): use kugetsu-log for timeout messages
Use log_warn and log_error instead of echo for unified log formatting.
This commit is contained in:
@@ -50,7 +50,7 @@ check_task_completion() {
|
|||||||
local hours_elapsed=$(( (now_epoch - notified_epoch) / 3600 ))
|
local hours_elapsed=$(( (now_epoch - notified_epoch) / 3600 ))
|
||||||
if [ "$hours_elapsed" -ge "${TASK_TIMEOUT_HOURS:-1}" ]; then
|
if [ "$hours_elapsed" -ge "${TASK_TIMEOUT_HOURS:-1}" ]; then
|
||||||
timed_out=true
|
timed_out=true
|
||||||
echo "Task $queue_id ($issue_ref) timed out after ${hours_elapsed}h"
|
log_warn "queue-daemon" "Task $queue_id ($issue_ref) timed out after ${hours_elapsed}h"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ check_task_completion() {
|
|||||||
opencode session stop "$session_id" 2>/dev/null || true
|
opencode session stop "$session_id" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
update_queue_item_state "$queue_id" "error"
|
update_queue_item_state "$queue_id" "error"
|
||||||
echo "Task $queue_id ($issue_ref) marked error — timeout after ${hours_elapsed}h"
|
log_error "queue-daemon" "Task $queue_id ($issue_ref) marked error — timeout after ${hours_elapsed}h"
|
||||||
release_lock "$issue_ref"
|
release_lock "$issue_ref"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user