require 'sneakers'
require 'sneakers/handlers/maxretry'
require_relative 'pom_config'
Sneakers.configure(
  amqp: Pomegranate.config["events"]["server"],
  exchange: Pomegranate.config["events"]["exchange"],
  exchange_type: :fanout,
  handler: Sneakers::Handlers::Maxretry
)
Sneakers.logger.level = Logger::INFO

WORKER_OPTIONS = {
  ack: true,
  threads: 5,
  prefetch: 10,
  timeout_job_after: 60,
  heartbeat: 5,
  amqp_heartbeat: 10,
  retry_timeout: 60 * 1000 # 60 seconds
}.freeze

require 'sneakers'
require 'sneakers/handlers/maxretry'
require_relative 'pom_config'
Sneakers.configure(
  amqp: Pomegranate.config["events"]["server"],
  exchange: Pomegranate.config["events"]["exchange"],
  exchange_type: :fanout,
  handler: Sneakers::Handlers::Maxretry,
  timeout_job_after: 300
)
Sneakers.logger.level = Logger::INFO

WORKER_OPTIONS = {
  ack: true,
  threads: 5,
  prefetch: 10,
  timeout_job_after: 300,
  heartbeat: 5,
  amqp_heartbeat: 10,
  retry_timeout: 300 * 1000 # 5 minutes
}.freeze

Increase Sneakers sync job timeout
Increase Sneakers sync job timeout

Reindexing some items after getting a message was taking longer than the
60 second timeout, resulting in the connection getting cut.
