From b3a5b2d860f9503c54f79a6481278ee779d99c15 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Tue, 1 Aug 2017 18:06:51 -0700 Subject: [PATCH] directly use PurgeCacheWorker now --- models/site.rb | 14 +++++++------- workers/purge_cache_worker.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/models/site.rb b/models/site.rb index 4ba595b5..531c81a3 100644 --- a/models/site.rb +++ b/models/site.rb @@ -650,15 +650,15 @@ class Site < Sequel::Model # We gotta flush the dirname too if it's an index file. if relative_path != '' && relative_path.match(/\/$|index\.html?$/i) - PurgeCacheOrderWorker.perform_async username, relative_path + PurgeCacheWorker.perform_async username, relative_path purge_file_path = Pathname(relative_path).dirname.to_s purge_file_path += '/' if purge_file_path != '/' - PurgeCacheOrderWorker.perform_async username, '/?surf=1' if purge_file_path == '/' - PurgeCacheOrderWorker.perform_async username, purge_file_path + PurgeCacheWorker.perform_async username, '/?surf=1' if purge_file_path == '/' + PurgeCacheWorker.perform_async username, purge_file_path else - PurgeCacheOrderWorker.perform_async username, relative_path + PurgeCacheWorker.perform_async username, relative_path end end @@ -667,14 +667,14 @@ class Site < Sequel::Model def delete_cache(path) relative_path = path.gsub base_files_path, '' - DeleteCacheOrderWorker.perform_async username, relative_path + PurgeCacheWorker.perform_async username, relative_path # We gotta flush the dirname too if it's an index file. if relative_path != '' && relative_path.match(/\/$|index\.html?$/i) purge_file_path = Pathname(relative_path).dirname.to_s - DeleteCacheOrderWorker.perform_async username, '/?surf=1' if purge_file_path == '/' - DeleteCacheOrderWorker.perform_async username, purge_file_path + PurgeCacheWorker.perform_async username, '/?surf=1' if purge_file_path == '/' + PurgeCacheWorker.perform_async username, purge_file_path end end diff --git a/workers/purge_cache_worker.rb b/workers/purge_cache_worker.rb index 73dc326d..73ddf503 100644 --- a/workers/purge_cache_worker.rb +++ b/workers/purge_cache_worker.rb @@ -10,7 +10,7 @@ class PurgeCacheWorker 60 end - def perform(proxy_ip, username, path) + def perform(username, path) # Must always have a forward slash path = '/' + path if path[0] != '/'