Skip to content

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

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions