Sha256: 38efe74369aaa36587d51a3d45c148a0e13a6ae58c8577227391e1e20dba4d84

Contents?: true

Size: 524 Bytes

Versions: 20

Compression:

Stored size: 524 Bytes

Contents

module Fog
  module AWS
    class Storage
      class Real
        # Sync clock against S3 to avoid skew errors
        #
        def sync_clock
          response = begin
            get_service
          rescue Excon::Errors::HTTPStatusError => error
            error.response
          end
          Fog::Time.now = Time.parse(response.headers['Date'])
        end
      end # Real

      class Mock # :nodoc:all
        def sync_clock
          true
        end
      end # Mock
    end # Storage
  end # AWS
end # Fog

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
fog-aws-3.14.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.13.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.12.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.11.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.10.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.9.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.8.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.7.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.7 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.6 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.5 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.4 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.3 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.6.2 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.5.2 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.5.1 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.5.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.4.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.3.0 lib/fog/aws/requests/storage/sync_clock.rb
fog-aws-3.2.0 lib/fog/aws/requests/storage/sync_clock.rb