File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -155,6 +155,7 @@ def purge(url):
155155 if not UPLOAD_HOST or NO_UPLOAD :
156156 print ("Skipping purge of" , url , "because UPLOAD_HOST is missing" )
157157 return
158+ print ("Purging" , url )
158159 with urlopen (Request (url , method = "PURGE" , headers = {"Fastly-Soft-Purge" : 1 })) as r :
159160 r .read ()
160161
@@ -302,7 +303,15 @@ def install_sortkey(install):
302303 upload_ssh (MANIFEST_FILE , MANIFEST_PATH )
303304
304305 print ("Purging" , len (UPLOADS ), "uploaded files" )
306+ parents = set ()
305307 for i , * _ in UPLOADS :
306308 purge (i ["url" ])
309+ parents .add (i ["url" ].rpartition ("/" )[0 ] + "/" )
310+ for i in parents :
311+ purge (i )
307312 if INDEX_URL :
308313 purge (INDEX_URL )
314+ purge (INDEX_URL .rpartition ("/" )[0 ] + "/" )
315+ if MANIFEST_URL :
316+ purge (MANIFEST_URL )
317+ purge (MANIFEST_URL .rpartition ("/" )[0 ] + "/" )
You can’t perform that action at this time.
0 commit comments