diff options
author | Magnus Hagander | 2019-06-19 19:39:20 +0000 |
---|---|---|
committer | Magnus Hagander | 2019-06-19 19:39:20 +0000 |
commit | 2b138363a46c90de0069edaddf114c0bd1dc3d33 (patch) | |
tree | 463bcd5ebfee983d9a027ef30fe392f12719f036 /loader/lib/varnish.py | |
parent | 6394cfb1c2ad1e69f5904829898197e89b0d1cf4 (diff) |
Use xkey instead of regexp when purging threads and lists
Diffstat (limited to 'loader/lib/varnish.py')
-rw-r--r-- | loader/lib/varnish.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/loader/lib/varnish.py b/loader/lib/varnish.py index 2b2bf89..4d346dd 100644 --- a/loader/lib/varnish.py +++ b/loader/lib/varnish.py @@ -19,11 +19,11 @@ class VarnishPurger(object): for p in purges: if isinstance(p, tuple): # Purging a list - exprlist.append('obj.http.x-pglm ~ :%s/%s/%s:' % p) + exprlist.append('pgam_%s/%s/%s' % p) else: # Purging individual thread - exprlist.append('obj.http.x-pgthread ~ :%s:' % p) - purgedict = dict(list(zip(['p%s' % n for n in range(0, len(exprlist))], exprlist))) + exprlist.append('pgat_%:' % p) + purgedict = dict(list(zip(['x%s' % n for n in range(0, len(exprlist))], exprlist))) purgedict['n'] = len(exprlist) r = requests.post(purgeurl, data=purgedict, headers={ 'Content-type': 'application/x-www-form-urlencoded', |