feat(configuration): update asynq concurrency settings and enhance FAQ handling
- Increased the default worker pool size for the asynq server from 16 to 32 to improve performance during concurrent uploads. - Updated the .env.example and docker-compose.yml files to reflect the new default concurrency setting. - Enhanced the handling of FAQ entries in the tool results, ensuring distinct identification through standard questions, improving user experience and clarity in the output. - Refactored related components to utilize the new FAQ attributes, ensuring consistent display and interaction across the application.
This commit is contained in:
@@ -23,4 +23,20 @@ type TaskInspector interface {
|
||||
// best-effort: the row-level abort flag remains the source of
|
||||
// truth, this just prevents wasted work.
|
||||
CancelTasksForKnowledge(ctx context.Context, knowledgeID string) (deleted int, cancelled int, err error)
|
||||
|
||||
// HasQueuedTasksForKnowledge reports whether any pending / scheduled
|
||||
// / retry / active task referencing the given knowledge ID still
|
||||
// lives in the queue backend. It is the read-only counterpart of
|
||||
// CancelTasksForKnowledge: the housekeeping sweep calls it before
|
||||
// flipping a long-idle "processing"/"finalizing" row to "failed" so
|
||||
// it can tell a genuinely orphaned row (no task anywhere) from one
|
||||
// whose enrichment subtasks are merely backlogged behind a busy
|
||||
// queue (no span heartbeat yet because no worker has picked them up).
|
||||
//
|
||||
// Best-effort and short-circuiting: it returns true as soon as the
|
||||
// first match is seen. On backend error it returns (false, err);
|
||||
// callers decide the fail-safe direction. Lite mode (no Redis)
|
||||
// always returns false — inline executors never queue, so the
|
||||
// span/updated_at checks remain authoritative there.
|
||||
HasQueuedTasksForKnowledge(ctx context.Context, knowledgeID string) (bool, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user