Guest User

Untitled

a guest
Aug 19th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. Resque worker failing with PostgreSQL server
  2. getaddrinfo: nodename nor servname provided, or not known
  3.  
  4. Class SentimentJob
  5. Arguments [4, 5, 6]
  6. Exception ActiveRecord::StatementInvalid
  7. Error PGError: server closed the connection unexpectedly This probably means
  8. the server terminated abnormally before or while processing the request.
  9. : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc,
  10. a.attnotnull FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid =
  11. d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"taggings"'::regclass
  12. AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum
  13.  
  14. Class FBConnectionsJob
  15. Arguments 1
  16. Exception OpenSSL::SSL::SSLError
  17. Error SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B:
  18. certificate verify failed
  19.  
  20. Class FBConnectionsJob
  21. Arguments 1
  22. Exception ActiveRecord::StatementInvalid
  23. Error PGError: server closed the connection unexpectedly This probably means
  24. the server terminated abnormally before or while processing the request.
  25. : SELECT tablename FROM pg_tables WHERE schemaname = ANY
  26. (current_schemas(false))
  27.  
  28. uri = URI.parse(ENV["REDISTOGO_URL"])
  29. Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
  30. Dir["#{Rails.root}/app/jobs/*.rb"].each { |file| require file }
  31.  
  32. uri = URI.parse(ENV["REDISTOGO_URL"])
  33. REDIS = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
  34. Resque.redis = REDIS
  35.  
  36. ENV["REDISTOGO_URL"] = 'redis://username:password@my.host:6789'
  37.  
  38. task "resque:setup" => :environment do
  39. Resque.before_fork = Proc.new { ActiveRecord::Base.establish_connection }
  40. end
  41.  
  42. if Rails.env.development?
  43. uri = URI.parse(ENV["REDISTOGO_URL"])
  44. Resque.redis = Redis.new(:host => 'localhost', :port => '6379')
  45. else
  46. uri = URI.parse(ENV["REDISTOGO_URL"])
  47. Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
  48. end
Add Comment
Please, Sign In to add comment