DataObjects/Core_notify_server.php
authorAlan <alan@roojs.com>
Thu, 5 Oct 2023 09:00:46 +0000 (17:00 +0800)
committerAlan <alan@roojs.com>
Thu, 5 Oct 2023 09:00:46 +0000 (17:00 +0800)
DataObjects/Core_notify_server.php

index 1d4bb2d..4e60555 100644 (file)
@@ -24,16 +24,17 @@ class Pman_Core_DataObjects_Core_notify_server extends DB_DataObject
         $ns->poolname = $notify->poolname;
         $ns->is_active = 1;
         $ns->orderBy('id ASC');
-        $map = $ns->fetchAll('id' ,'hostname' );
-        $ids = array_keys($map);
+        $ids = $ns->fetchAll('id' );
+        
         
         if (empty($ids)) {
             $notify->jerr("no configured servers in core_notify_server for poolname = {$notify->poolname}");
             
         }
+        $self = $this->getCurrent($notify);
         
         // only run this on the first server...
-        if ($map[gethostname()] != $ids[0]) {
+        if ($self->id != $ids[0]) {
             return; 
         }
         foreach($ids as $rn) {