prefect icon indicating copy to clipboard operation
prefect copied to clipboard

Add CLI command to read runs in WQ

Open urimandujano opened this issue 1 year ago • 1 comments

This PR adds a CLI command to make it easy to read the runs off of a work queue:

❯ prefect work-queue read-runs --pool local-process-wp local-wq-2
Read 0 runs for work queue 'local-wq-2' in work pool local-process-wp: []

My main use case was simulating a worker/agent poll to a work queue to simulate work queue status events. The command was useful during testing and I can image it being useful to test other work queue status related things (i.e. automations, events). Note that running this command is equivalent to a worker polling a work queue and may lead to a temporary false positive where it looks like "something is polling for work" but it was just a one time command.

Example

Checklist

  • [ ] This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • [ ] This pull request includes tests or only affects documentation.
  • [ ] This pull request includes a label categorizing the change e.g. maintenance, fix, feature, enhancement, docs.

For documentation changes:

  • [ ] This pull request includes redirect settings in netlify.toml for files that are removed or renamed.

For new functions or classes in the Python SDK:

  • [ ] This pull request includes helpful docstrings.
  • [ ] If a new Python file was added, this pull request contains a stub page in the Python SDK docs and an entry in mkdocs.yml navigation.

urimandujano avatar Feb 14 '24 22:02 urimandujano

Deploy Preview for prefect-docs-preview ready!

Name Link
Latest commit 7a2c6360930373c378aff99e4e914a0fb39e98fb
Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/65cfcfcbe20ade0008cf260d
Deploy Preview https://deploy-preview-11989--prefect-docs-preview.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Feb 14 '24 22:02 netlify[bot]