mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
91d3db4034
Co-authored-by: nilsding <nilsding@nilsding.org>
21 lines
530 B
Ruby
21 lines
530 B
Ruby
require "rpush/daemon"
|
|
require "rpush/daemon/store/active_record"
|
|
require "rpush/client/active_record"
|
|
|
|
redis_url = ENV.fetch("REDIS_URL") { APP_CONFIG["redis_url"] }
|
|
|
|
Sidekiq.configure_server do |config|
|
|
config.redis = { url: redis_url }
|
|
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
|
|
end
|
|
|
|
Sidekiq.configure_client do |config|
|
|
config.redis = { url: redis_url }
|
|
end
|