-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding feature to remove the SQS queues
- Loading branch information
1 parent
8a95b3b
commit 2ff73d7
Showing
3 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from core.region_connection import SQSConnection | ||
|
||
def teardown_sqs(): | ||
conn = SQSConnection() | ||
|
||
for queue in conn.get_all_queues(prefix='nimbostratus'): | ||
|
||
# Empty the queue in order to remove it | ||
for message in queue.get_messages(): | ||
queue.delete_message(message) | ||
|
||
conn.delete_queue(queue) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters