Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
marickvantuil committed Jul 2, 2023
1 parent e24bbee commit aad2d5d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Please check the [Laravel support policy](https://laravel.com/docs/master/releas
'handler' => env('STACKKIT_CLOUD_TASKS_HANDLER', ''),
'queue' => env('STACKKIT_CLOUD_TASKS_QUEUE', 'default'),
'service_account_email' => env('STACKKIT_CLOUD_TASKS_SERVICE_EMAIL', ''),
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', false),
'signed_audience' => env('STACKKIT_CLOUD_TASKS_SIGNED_AUDIENCE', true),
// Optional: The deadline in seconds for requests sent to the worker. If the worker
// does not respond by this deadline then the request is cancelled and the attempt
// is marked as a DEADLINE_EXCEEDED failure.
Expand Down
4 changes: 3 additions & 1 deletion src/CloudTasksQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ protected function pushToCloudTasks($queue, $payload, $delay = 0)

$token = new OidcToken;
$token->setServiceAccountEmail($this->config['service_account_email']);
if ($audience = $this->getAudience()) $token->setAudience($audience);
if ($audience = $this->getAudience()) {
$token->setAudience($audience);
}
$httpRequest->setOidcToken($token);

if ($availableAt > time()) {
Expand Down

0 comments on commit aad2d5d

Please sign in to comment.