Skip to content

Add a 'logs' command to follow an already-running or already-started scraper run #32

Description

@Br3nda

Add a morph logs (or similar) command that follows an existing run's output, separate from execute.

Why

Right now execute is the only real command - it bundles "upload code" and "run it" into one atomic action and streams that run's output as it happens. There's no way to attach to a run that was started some other way - e.g. triggered manually from the website's "Run now" button, or a scheduled auto-run - so anyone who kicks off a run outside the CLI has to go watch it in the browser instead.

Proposal

A command like morph logs <scraper> (naming TBD) that finds the scraper's current/most recent run and streams its output, the same way execute already does - just without needing to upload code first.

Open question

Didn't check whether the server (openaustralia/morph) actually has an endpoint that can stream an existing run's output today - run_remote in ApiController is upload+run+stream as one thing, and I didn't find a separate read-only "attach to run N" endpoint while looking at this. This might need server-side work in morph first, not just a CLI-side addition.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions