Skip to content

Commit

Permalink
remove flag which can be set by the user; Use env instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouyihaiDing committed Aug 8, 2018
1 parent 7ff774b commit 4d8cf72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Spanner/src/Connection/Grpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ private function enableConnectionManagement($conf_path)
*/
public function __construct(array $config = [])
{
putenv('ENABLE_GCP_OPTIMIZER=TRUE');
$this->serializer = new Serializer([
'commit_timestamp' => function ($v) {
return $this->formatTimestampFromApi($v);
Expand Down Expand Up @@ -165,7 +166,7 @@ public function __construct(array $config = [])
: null
);

if (isset($config['enableGcpOptimizer'])) {
if (getenv('ENABLE_GCP_OPTIMIZER')) {
$api = 'spanner';
$conf_path = __DIR__. "/../$api.grpc.config";
$grpc_gcp_config = $this->enableConnectionManagement($conf_path);
Expand Down

0 comments on commit 4d8cf72

Please sign in to comment.