2022-12-25 15:34:04 -08:00
|
|
|
require "rpush/daemon"
|
|
|
|
require "rpush/daemon/store/active_record"
|
|
|
|
require "rpush/client/active_record"
|
|
|
|
|
2020-04-20 13:02:48 -07:00
|
|
|
redis_url = ENV.fetch("REDIS_URL") { APP_CONFIG["redis_url"] }
|
|
|
|
|
2014-12-12 08:35:16 -08:00
|
|
|
Sidekiq.configure_server do |config|
|
2020-04-20 13:02:48 -07:00
|
|
|
config.redis = { url: redis_url }
|
2022-12-25 15:34:04 -08:00
|
|
|
Rpush.config.push = true
|
|
|
|
Rpush::Daemon.store = Rpush::Daemon::Store::ActiveRecord.new
|
|
|
|
Rpush::Daemon.common_init
|
|
|
|
Rpush::Daemon::Synchronizer.sync
|
|
|
|
|
|
|
|
at_exit do
|
|
|
|
Rpush::Daemon::AppRunner.stop
|
|
|
|
end
|
2014-12-12 08:35:16 -08:00
|
|
|
end
|
|
|
|
|
|
|
|
Sidekiq.configure_client do |config|
|
2020-04-20 13:02:48 -07:00
|
|
|
config.redis = { url: redis_url }
|
2022-12-25 15:34:04 -08:00
|
|
|
end
|