66 binding_path_with_exchange_queue ,
77 exchange_address ,
88 path_address ,
9+ purge_queue_address ,
910 queue_address ,
1011)
1112from .common import CommonValues
@@ -157,7 +158,6 @@ def delete_exchange(self, exchange_name: str) -> None:
157158 path ,
158159 CommonValues .command_delete .value ,
159160 [
160- CommonValues .response_code_200 .value ,
161161 CommonValues .response_code_204 .value ,
162162 ],
163163 )
@@ -172,7 +172,6 @@ def delete_queue(self, queue_name: str) -> None:
172172 CommonValues .command_delete .value ,
173173 [
174174 CommonValues .response_code_200 .value ,
175- CommonValues .response_code_204 .value ,
176175 ],
177176 )
178177
@@ -223,7 +222,6 @@ def unbind(self, binding_exchange_queue_path: str) -> None:
223222 binding_exchange_queue_path ,
224223 CommonValues .command_delete .value ,
225224 [
226- CommonValues .response_code_200 .value ,
227225 CommonValues .response_code_204 .value ,
228226 ],
229227 )
@@ -232,4 +230,17 @@ def unbind(self, binding_exchange_queue_path: str) -> None:
232230 # def queue_info(self, queue_name:str):
233231
234232 # TODO
235- # def purge_queue(self, queue_name:str):
233+ def purge_queue (self , queue_name : str ):
234+ logger .debug ("purge_queue operation called" )
235+ path = purge_queue_address (queue_name )
236+
237+ print ("path: " + path )
238+
239+ self .request (
240+ None ,
241+ path ,
242+ CommonValues .command_delete .value ,
243+ [
244+ CommonValues .response_code_200 .value ,
245+ ],
246+ )
0 commit comments