Skip to content

Commit

Permalink
use latest library version
Browse files Browse the repository at this point in the history
  • Loading branch information
bshaffer committed Dec 13, 2024
1 parent 4db5442 commit 2248b46
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion storagetransfer/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"google/cloud-storage-transfer": "^1.4",
"google/cloud-storage-transfer": "^2.0",
"paragonie/random_compat": "^9.0.0"
},
"require-dev": {
Expand Down
5 changes: 2 additions & 3 deletions storagetransfer/src/check_latest_transfer_operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,8 @@ function check_latest_transfer_operation(
$latestOperationName = $request->getLatestOperationName();

if ($latestOperationName) {
$transferOperation = $client->getOperationsClient()->getOperation($latestOperationName);

$operation = $transferOperation->getMetadata();
$transferOperation = $client->resumeOperation($latestOperationName);
$operation = $transferOperation->getLastProtoResponse();

printf('Latest transfer operation for %s is: %s ' . PHP_EOL, $jobName, $operation->serializeToJsonString());
} else {
Expand Down
2 changes: 1 addition & 1 deletion storagetransfer/src/nearline_request.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function nearline_request(
$dateTime = new DateTime($startDate);
$date = new Date([
'year' => $dateTime->format('Y'),
'month' => $dateTime->format('m') + 1,
'month' => $dateTime->format('m'),
'day' => $dateTime->format('d'),
]);

Expand Down

0 comments on commit 2248b46

Please sign in to comment.