fixes to errors on clearing cache
authorAlan Knowles <alan@roojs.com>
Mon, 5 Nov 2018 08:16:15 +0000 (16:16 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 5 Nov 2018 08:16:15 +0000 (16:16 +0800)
UpdateDatabase.php
sql/core_domain.sql

index 4fda8da..2385354 100644 (file)
@@ -1264,13 +1264,14 @@ class Pman_Core_UpdateDatabase extends Pman
         echo "Clearing Database Cache\n";
         // this needs to clear it's own cache along with remote one..
   
-        
-        $response = $this->curl("http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache");
+        $url = "http://localhost{$this->local_base_url}/Core/RefreshDatabaseCache";
+        $response = $this->curl($url);
         
         $json = json_decode($response, true);
         
         if(empty($json['data']) || $json['data'] != 'DONE'){
-            echo $response. "\n";
+            echo "fetching $url\n";
+            echo "GOT:" . $response. "\n";
             echo "Clear DataObjects Cache failed\n";
             exit;
         }
index c22e29b..468c975 100644 (file)
@@ -3,7 +3,7 @@ CREATE TABLE core_domain (
   id int(11) NOT NULL auto_increment,
   PRIMARY KEY  (id)
 ) ENGINE=innodb DEFAULT  CHARSET=utf8 ;
--- need to specify engine set, as 
+-- need to specify engine set, otherwise the unique index get's borked.
 
 ALTER TABLE core_domain ADD COLUMN domain VARCHAR(255) NOT NULL DEFAULT '';