Skip to content

Commit

Permalink
fix gcloud key reference
Browse files Browse the repository at this point in the history
  • Loading branch information
allantatter committed Sep 20, 2022
1 parent cad1624 commit f00cb0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/google-cloud-queues.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [
'project_id' => env('GOOGLE_CLOUD_PROJECT_ID', 'your-project-id'),
'key_file_path' => env('GOOGLE_CLOUD_KEY_FILE', null), // optional: /path/to/service-account.json
'key_file_path' => env('GOOGLE_CLOUD_QUEUES_KEY_FILE', null), // optional: /path/to/service-account.json
'location' => env('GOOGLE_CLOUD_QUEUES_LOCATION', 'europe-west6'),
'queue_prefix' => env('GOOGLE_CLOUD_QUEUES_PREFIX', 'google-cloud-queue--'),

Expand Down
4 changes: 3 additions & 1 deletion src/Queues.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ class Queues

public function __construct()
{
$this->client = new Client(config('google-cloud-queues'), new CloudTasksClient());
$this->client = new Client(config('google-cloud-queues'), new CloudTasksClient([
'keyFilePath' => config('google-cloud-queues.key_file_path'),
]));
$this->queues = $this->parseQueues(config('google-cloud-queues'), config('google-cloud-queues.queues'));
}

Expand Down

0 comments on commit f00cb0f

Please sign in to comment.