Consolidate worker pool interfaces #41

Closed
opened 2026-02-15 03:52:52 +03:00 by NiXTheDev · 0 comments
NiXTheDev commented 2026-02-15 03:52:52 +03:00 (Migrated from github.com)

Description

Move IWorkerPool interface to types.ts and clean up worker pool abstraction layer.

Background

Currently the worker pool interface is in a separate file (workerPoolInterface.ts) which adds unnecessary indirection. With WorkerPool v1 being deprecated, we can simplify the architecture.

Implementation Plan

  1. Move interface to types.ts

    • Move IWorkerPool interface from workerPoolInterface.ts to types.ts
    • Update all imports across codebase
    • Delete workerPoolInterface.ts
  2. Simplify interface (optional)

    • Review if all methods in IWorkerPool are still needed
    • Consider removing methods only used for testing
    • Keep core: run(), shutdown(), getStats()
  3. Update WorkerPool implementation

    • Ensure WorkerPool (renamed from V2) implements updated interface
    • Fix any type mismatches
    • Update method signatures if needed
  4. Update all references

    • index.ts imports
    • sed.ts imports
    • Test files
    • Any other files using IWorkerPool

Acceptance Criteria

  • IWorkerPool moved to types.ts
  • workerPoolInterface.ts deleted
  • All imports updated
  • No type errors
  • All tests pass

Part of Epic #38

## Description Move IWorkerPool interface to types.ts and clean up worker pool abstraction layer. ## Background Currently the worker pool interface is in a separate file (workerPoolInterface.ts) which adds unnecessary indirection. With WorkerPool v1 being deprecated, we can simplify the architecture. ## Implementation Plan 1. **Move interface to types.ts** - Move IWorkerPool interface from workerPoolInterface.ts to types.ts - Update all imports across codebase - Delete workerPoolInterface.ts 2. **Simplify interface (optional)** - Review if all methods in IWorkerPool are still needed - Consider removing methods only used for testing - Keep core: run(), shutdown(), getStats() 3. **Update WorkerPool implementation** - Ensure WorkerPool (renamed from V2) implements updated interface - Fix any type mismatches - Update method signatures if needed 4. **Update all references** - index.ts imports - sed.ts imports - Test files - Any other files using IWorkerPool ## Acceptance Criteria - [ ] IWorkerPool moved to types.ts - [ ] workerPoolInterface.ts deleted - [ ] All imports updated - [ ] No type errors - [ ] All tests pass ## Related Part of Epic #38
Sign in to join this conversation.
No description provided.