Skip to content

Instantly share code, notes, and snippets.

@azuby
Created February 14, 2012 21:15
Show Gist options
  • Save azuby/1830509 to your computer and use it in GitHub Desktop.
Save azuby/1830509 to your computer and use it in GitHub Desktop.
class Clocker
@queue = :clock_queue
def self.perform(clock_id)
clock = Clock.find(clock_id)
end
end
Exception:
ActiveRecord::StatementInvalid
Error:
PGError: SSL error: decryption failed or bad record mac : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"clocks"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:1106:in `async_exec'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:1106:in `exec_no_cache'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:650:in `block in exec_query'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `block in log'
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-3.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:649:in `exec_query'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:1231:in `column_definitions'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:845:in `columns'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/connection_adapters/schema_cache.rb:12:in `block in initialize'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/model_schema.rb:228:in `yield'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/model_schema.rb:228:in `default'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/model_schema.rb:228:in `columns'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/model_schema.rb:237:in `columns_hash'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/relation/delegation.rb:7:in `columns_hash'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/relation/finder_methods.rb:330:in `find_one'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/relation/finder_methods.rb:311:in `find_with_ids'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/relation/finder_methods.rb:107:in `find'
/app/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.0/lib/active_record/querying.rb:5:in `find'
/app/app/workers/clock_locator.rb:4:in `perform'
clock = shift.build_clock(:datetime => Time.now)
shift.save!
Resque.enqueue(Clocker, clock.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment