From b568493dbfb53648e17e9fdec315a69c0ca48acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:09:48 +0200 Subject: [PATCH] test --- install/update.php | 15 +-------------- install/update/4.5.0.php | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/install/update.php b/install/update.php index 3f4a67fa64..76d0fc3dea 100644 --- a/install/update.php +++ b/install/update.php @@ -98,20 +98,7 @@ $backup_ok = true; } echo "[PROGRESS][10]\n"; - try { - echo "Save cache state of cmd and eqLogic..."; - $data = array('cmd' => array(),'eqLogic' => array()); - foreach(cmd::all() as $cmd){ - $data['cmd'][$cmd->getId()] = $cmd->getCache(); - } - foreach(eqLogic::all() as $eqLogic){ - $data['eqLogic'][$eqLogic->getId()] = $eqLogic->getCache(); - } - file_put_contents('/tmp/jeedom/cache.json',json_encode($data)); - echo "OK\n"; - } catch (Exception $e) { - echo '***WARNING***' . $e->getMessage(); - } + echo "[PROGRESS][12]\n"; if (init('core', 1) == 1) { diff --git a/install/update/4.5.0.php b/install/update/4.5.0.php index 785d8162d9..e32cc74567 100644 --- a/install/update/4.5.0.php +++ b/install/update/4.5.0.php @@ -11,5 +11,18 @@ } catch (\Throwable $th) { echo 'Error on empty cache : '.$th->getMessage(); } - +try { + echo "Save cache state of cmd and eqLogic..."; + $data = array('cmd' => array(),'eqLogic' => array()); + foreach(cmd::all() as $cmd){ + $data['cmd'][$cmd->getId()] = $cmd->getCache(); + } + foreach(eqLogic::all() as $eqLogic){ + $data['eqLogic'][$eqLogic->getId()] = $eqLogic->getCache(); + } + file_put_contents('/tmp/jeedom/cache.json',json_encode($data)); + echo "OK\n"; +} catch (Exception $e) { + echo '***WARNING***' . $e->getMessage(); +} echo shell_exec('php '.__DIR__.'/reloadCache.php'); \ No newline at end of file