Improve purge opcache
This commit is contained in:
@@ -9,6 +9,7 @@ from wo.core.aptget import WOAptGet
|
||||
from wo.core.logging import Log
|
||||
from wo.core.services import WOService
|
||||
from wo.core.shellexec import WOShellExec
|
||||
from wo.core.variables import WOVar
|
||||
|
||||
|
||||
def wo_clean_hook(app):
|
||||
@@ -78,15 +79,12 @@ class WOCleanController(CementBaseController):
|
||||
'/var/www/22222/htdocs/cache/opcache')):
|
||||
try:
|
||||
Log.info(self, "Cleaning opcache")
|
||||
if os.path.exists('{0}php72.php'.format(opcache_dir)):
|
||||
wo_php_version = list(WOVar.wo_php_versions.keys())
|
||||
for wo_php in wo_php_version:
|
||||
if os.path.exists('{0}{1}.php'.format(opcache_dir, wo_php)):
|
||||
requests.get(
|
||||
"http://127.0.0.1/cache/opcache/php72.php")
|
||||
if os.path.exists('{0}php73.php'.format(opcache_dir)):
|
||||
requests.get(
|
||||
"http://127.0.0.1/cache/opcache/php73.php")
|
||||
if os.path.exists('{0}php74.php'.format(opcache_dir)):
|
||||
requests.get(
|
||||
"http://127.0.0.1/cache/opcache/php74.php")
|
||||
"http://127.0.0.1/cache/opcache/{0}.php".format(wo_php))
|
||||
|
||||
except requests.HTTPError as e:
|
||||
Log.debug(self, "{0}".format(e))
|
||||
Log.debug(self, "Unable hit url, "
|
||||
|
||||
Reference in New Issue
Block a user