alerta delete not removing all alerts
Issue Summary When running "alerta delete" it does not appear to remove them all. I have to run the command multiple times to get all of the alerts cleared. I have tried waiting for a couple of minutes after running the command but it does not help.
Example:
$ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 178 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 129 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 82 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 34 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y $
Environment
-
OS: Linux
-
API version: 8.0.3
-
Deployment: self hosted
-
For self-hosted, WSGI environment: nginx/uwsgi
-
Database: Mongo
-
web UI version: 8.0
-
CLI version: 8.0
This is a page size issue. If the default page size is less than the number of heartbeats you'll need to run the command repeatedly. I've made a note to review paging more generally so I'll address this issue at the same time. Thanks for bringing it to my attention.