28 lines
1.0 KiB
Markdown
28 lines
1.0 KiB
Markdown
This python script is to clean up surged rabbitMQ queue.
|
|
|
|
---
|
|
|
|
## Usage
|
|
The script takes the following arguments-
|
|
```
|
|
usage: main.py [-h] [--host HOST] [--user USER] [--password PASSWORD] [--queue QUEUE] --job-id JOB_ID --type TYPE
|
|
|
|
RabbitMQ message purger and manager
|
|
|
|
options:
|
|
-h, --help show this help message and exit
|
|
--host HOST RabbitMQ host (default: localhost)
|
|
--user USER RabbitMQ username (default: admin)
|
|
--password PASSWORD RabbitMQ password (default: admin)
|
|
--queue QUEUE Queue name (default: my_queue)
|
|
--job-id JOB_ID Comma-separated list of job IDs to exclude
|
|
--type TYPE Type of operation (example: createClusters)
|
|
|
|
The script can be executed directly with python script. Follow the commands below-
|
|
```
|
|
To run the script-
|
|
```
|
|
git clone https://git.ngbackend.cloud/shafin.hasnat/RMQ-cleanup
|
|
pip install -r requirements.txt
|
|
python3 main.py --host=192.168.0.195 --user=admin --password=admin --queue=my_queue --job-id=12345,54321 --type=createClusters
|
|
``` |