File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 1212INVALIDATION_BATCH_DEFAULT = 3000
1313INVALIDATION_BATCH_WILDCARD = 15
1414
15+ INVALIDATION_STATUS_COMPLETED = "Completed"
16+ INVALIDATION_STATUS_INPROGRESS = "InProgress"
17+
1518DEFAULT_BUCKET_TO_DOMAIN = {
1619 "prod-ga" : "maven.repository.redhat.com" ,
1720 "prod-maven-ga" : "maven.repository.redhat.com" ,
@@ -91,7 +94,7 @@ def invalidate_paths(
9194 current_invalidation = {}
9295 for batch_paths in real_paths :
9396 while (current_invalidation and
94- 'InProgress' == current_invalidation .get ('Status' , '' )):
97+ INVALIDATION_STATUS_INPROGRESS == current_invalidation .get ('Status' , '' )):
9598 time .sleep (5 )
9699 try :
97100 result = self .check_invalidation (distr_id , current_invalidation .get ('Id' ))
Original file line number Diff line number Diff line change @@ -104,9 +104,15 @@ def invalidate_cf_paths(
104104 distr_id , final_paths , real_batch_size
105105 )
106106 if result :
107+ output = {}
108+ for invalidation in result :
109+ status = invalidation .get ('Status' )
110+ if status not in output :
111+ output [status ] = []
112+ output [status ].append (invalidation ["Id" ])
107113 logger .info (
108114 "The CF invalidating request for metadata/indexing is sent, "
109- "request status as below:\n %s" , result
115+ "request result as below:\n %s" , output
110116 )
111117 else :
112118 logger .error (
You can’t perform that action at this time.
0 commit comments