Skip to content

Add a timeout cap and shared poller for index/ingest commands #121

@bharatsachya

Description

@bharatsachya

Type: simplification / robustness · Difficulty: medium

pollIndexToCompletion (packages/cli/src/indexPoller.ts:31) and pollJobStatus (packages/cli/src/IngestCommand.ts:72) both loop on while (true) with a 1500ms delay, exiting only on PROCESSED/FAILED or a poll exception. If a job sticks in QUEUED/PROCESSING the CLI spins forever — the user must Ctrl-C.

Do: factor the two near-identical loops into one poller with a max wall-clock / max-attempts cap; on exceed, stop the spinner with "still running in background — check bytebell ls" and exit non-zero.

Done when: both commands share one poller that cannot hang indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions