Преглед изворни кода

ref #121, #122 Clear a native GearmanClient instace after success job call

to avoid side effects of re-applying servers, callback and so far
Veniamin Albaev пре 10 година
родитељ
комит
bb75f241f7
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      Service/GearmanClient.php

+ 6 - 0
Service/GearmanClient.php

@@ -252,6 +252,8 @@ class GearmanClient extends AbstractGearmanService
         $result = $gearmanClient->$method($worker['job']['realCallableName'], $params, $unique);
         $this->returnCode = $gearmanClient->returnCode();
 
+        $this->gearmanClient = null;
+
         return $result;
     }
 
@@ -449,6 +451,8 @@ class GearmanClient extends AbstractGearmanService
 
         $jobStatus = new JobStatus($statusData);
 
+        $this->gearmanClient = null;
+
         return $jobStatus;
     }
 
@@ -686,6 +690,8 @@ class GearmanClient extends AbstractGearmanService
 
         $this->initTaskStructure();
 
+        $this->gearmanClient = null;
+
         return $gearmanClient->runTasks();
     }
 }