Skip to content

Commit

Permalink
Makefile/clean-rabbit: Also cleanup exchanges
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaymankar committed Oct 21, 2024
1 parent 8f51bed commit c87d7b0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ install: init

.PHONY: clean-rabbit
clean-rabbit:
rabbitmqadmin -f pretty_json list queues vhost name messages | jq -r '.[] | "rabbitmqadmin delete queue name=\(.name) --vhost=\(.vhost)"' | bash
rabbitmqadmin -f pretty_json list queues vhost name \
| jq -r '.[] | "rabbitmqadmin delete queue name=\(.name) --vhost=\(.vhost)"' \
| bash
rabbitmqadmin -f pretty_json list exchanges name vhost \
| jq -r '.[] |select(.name | startswith("amq") | not) | select (.name != "") | "rabbitmqadmin delete exchange name=\(.name) --vhost=\(.vhost)"' \
| bash

# Clean
.PHONY: full-clean
Expand Down Expand Up @@ -85,7 +90,7 @@ cabal.project.local:
c: treefmt c-fast

.PHONY: c
c-fast:
c-fast:
cabal build $(WIRE_CABAL_BUILD_OPTIONS) $(package) || ( make clean-hint; false )
ifeq ($(test), 1)
./hack/bin/cabal-run-tests.sh $(package) $(testargs)
Expand Down

0 comments on commit c87d7b0

Please sign in to comment.