-
Notifications
You must be signed in to change notification settings - Fork 1k
Add purge queue command #8353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add purge queue command #8353
Conversation
🦋 Changeset detectedLatest commit: 09a96c9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-wrangler-8353You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8353/npm-package-wrangler-8353Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-wrangler-8353 dev path/to/script.jsAdditional artifacts:cloudflare-workers-bindings-extension: wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-workers-bindings-extension-8353 -O ./cloudflare-workers-bindings-extension.0.0.0-v8dc6f3319.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v8dc6f3319.vsixcreate-cloudflare: npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-create-cloudflare-8353 --no-auto-update@cloudflare/kv-asset-handler: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-kv-asset-handler-8353miniflare: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-miniflare-8353@cloudflare/pages-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-pages-shared-8353@cloudflare/unenv-preset: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-unenv-preset-8353@cloudflare/vite-plugin: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-vite-plugin-8353@cloudflare/vitest-pool-workers: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-vitest-pool-workers-8353@cloudflare/workers-editor-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-workers-editor-shared-8353@cloudflare/workers-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-workers-shared-8353@cloudflare/workflows-shared: npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13794363054/npm-package-cloudflare-workflows-shared-8353Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
3e043ee to
f77e7e0
Compare
f77e7e0 to
30ec775
Compare
| ) { | ||
| const config = readConfig(args); | ||
|
|
||
| if (isInteractive()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to add a --force flag so there's a similar check in non-interactive mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call! I added the flag along with some better testing
|
|
||
| await purgeQueue(config, args.name); | ||
|
|
||
| logger.log(`Started a purge operation for Queue '${args.name}'`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: with that message I sort of expect there to be a Completed purge operation log eventually.
is the purge expected to take a while? how can the user confirm that this has succeeded/finished?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reworded this to avoid the confusion here!
|
@sdnts could you take a look tomorrow 🙏 |
|
I can't approve this but looks good to me! |
Fixes https://jira.cfdata.org/browse/MQ-851
Adds a new
purgecommand to delete all messages in a Queue.