Skip to content

bug: active_workers counter never updated in summarization_worker.rs #432

@AlexMikhalev

Description

@AlexMikhalev

Issue Description

The active_workers counter in SummarizationWorker is checked but never updated, making it useless for controlling concurrency.

Location

crates/terraphim_service/src/summarization_worker.rs:252

Current Code

```rust
if !self.is_paused
&& self.active_workers < self.config.max_concurrent_workers
&& task_sender.try_send(task.clone()).is_ok()
```

The active_workers field is checked but never incremented/decremented anywhere in the code.

Impact

  • MEDIUM priority - Logic bug
  • The counter provides no actual concurrency control
  • May lead to confusion about actual worker limits

Recommended Fix

Either:

  1. Update the counter when tasks are started/completed
  2. Remove the field entirely if not used

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrust

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions