Skip to content

Commit 1804d4a

Browse files
rubocooop....
1 parent 1a0a428 commit 1804d4a

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

  • google-cloud-spanner/lib/google/cloud/spanner

google-cloud-spanner/lib/google/cloud/spanner/session.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def execute_query sql, params: nil, types: nil, transaction: nil,
374374
response = service.execute_streaming_sql path, sql, **execute_query_options
375375

376376
results = Results.from_execute_query_response response, service, path, sql, execute_query_options
377-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
377+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
378378
results
379379
end
380380

@@ -444,7 +444,7 @@ def batch_update transaction, seqno, request_options: nil,
444444
batch.statements, seqno,
445445
request_options: request_options,
446446
call_options: call_options
447-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
447+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
448448
results
449449
end
450450

@@ -546,7 +546,7 @@ def read table, columns, keys: nil, index: nil, limit: nil,
546546

547547
results = Results.from_read_response response, service, path, table, columns, read_options
548548

549-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
549+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
550550

551551
results
552552
end
@@ -562,7 +562,7 @@ def partition_query sql, transaction, params: nil, types: nil,
562562
max_partitions: max_partitions,
563563
call_options: call_options
564564

565-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
565+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
566566

567567
results
568568
end
@@ -579,7 +579,7 @@ def partition_read table, columns, transaction, keys: nil,
579579
max_partitions: max_partitions,
580580
call_options: call_options
581581

582-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
582+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
583583

584584
results
585585
end
@@ -681,7 +681,7 @@ def commit transaction_id: nil, exclude_txn_from_change_streams: false,
681681
commit_options: commit_options,
682682
request_options: request_options,
683683
call_options: call_options
684-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
684+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
685685
resp = CommitResponse.from_grpc commit_resp
686686
commit_options ? resp : resp.timestamp
687687
end
@@ -779,7 +779,7 @@ def batch_write exclude_txn_from_change_streams: false,
779779
request_options: request_options,
780780
call_options: call_options
781781
results = BatchWriteResults.new response
782-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
782+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
783783
results
784784
end
785785

@@ -1365,7 +1365,7 @@ def delete table, keys = [],
13651365
# Rolls back the transaction, releasing any locks it holds.
13661366
def rollback transaction_id
13671367
service.rollback path, transaction_id
1368-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
1368+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
13691369
true
13701370
end
13711371

@@ -1394,7 +1394,7 @@ def create_empty_transaction exclude_txn_from_change_streams: false
13941394
def reload!
13951395
ensure_service!
13961396
@grpc = service.get_session path
1397-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
1397+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
13981398
self
13991399
rescue Google::Cloud::NotFoundError
14001400
labels = @grpc.labels.to_h unless @grpc.labels.to_h.empty?
@@ -1403,7 +1403,7 @@ def reload!
14031403
project: project_id, instance: instance_id, database: database_id
14041404
),
14051405
labels: labels
1406-
@last_updated_at = Process::clock_gettime(Process::CLOCK_MONOTONIC)
1406+
@last_updated_at = Process.clock_gettime Process::CLOCK_MONOTONIC
14071407
self
14081408
end
14091409

@@ -1439,7 +1439,7 @@ def release!
14391439
# @return [::Boolean]
14401440
def idle_since? duration_sec
14411441
return true if @last_updated_at.nil?
1442-
Process::clock_gettime(Process::CLOCK_MONOTONIC) > @last_updated_at + duration_sec
1442+
Process.clock_gettime(Process::CLOCK_MONOTONIC) > @last_updated_at + duration_sec
14431443
end
14441444

14451445
# Creates a new Session instance from a `V1::Session`.

0 commit comments

Comments
 (0)