Skip to content

Commit

Permalink
Merge pull request #18 from sunsgneayo/main
Browse files Browse the repository at this point in the history
Update AsyncConfigListenerProcess.php
  • Loading branch information
chaz6chez authored Nov 24, 2023
2 parents 64701cd + 82539bb commit 6b16b94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Process/AsyncConfigListenerProcess.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ public function __construct()
protected function _get(string $dataId, string $group, string $tenant, string $path)
{
$res = $this->client->config->get($dataId, $group, $tenant);
if (false === $res){
$this->logger()->error(
"Nacos listener failed: [1] {$this->client->config->getMessage()}.",
['dataId' => $dataId, 'trace' => []]
);
return;
}
if(file_put_contents($path, $res, LOCK_EX)){
reload($path);
}
Expand Down Expand Up @@ -118,4 +125,4 @@ public function onWorkerStop(Worker $worker){
}
}
}
}
}

0 comments on commit 6b16b94

Please sign in to comment.