VRFS-1054 removing reload slush
This commit is contained in:
parent
4369e0ba9b
commit
7f409c2cb4
|
|
@ -62,11 +62,11 @@ ActiveAdmin.register_page "Bootstrap" do
|
||||||
logging.save!
|
logging.save!
|
||||||
|
|
||||||
listen_socket1 = IcecastListenSocket.new
|
listen_socket1 = IcecastListenSocket.new
|
||||||
listen_socket1.port = 9000
|
listen_socket1.port = 10000
|
||||||
listen_socket1.save!
|
listen_socket1.save!
|
||||||
|
|
||||||
listen_socket2 = IcecastListenSocket.new
|
listen_socket2 = IcecastListenSocket.new
|
||||||
listen_socket2.port = 9001
|
listen_socket2.port = 10001
|
||||||
listen_socket2.save!
|
listen_socket2.save!
|
||||||
|
|
||||||
template = IcecastTemplate.new
|
template = IcecastTemplate.new
|
||||||
|
|
@ -128,11 +128,11 @@ ActiveAdmin.register_page "Bootstrap" do
|
||||||
logging.save!
|
logging.save!
|
||||||
|
|
||||||
listen_socket1 = IcecastListenSocket.new
|
listen_socket1 = IcecastListenSocket.new
|
||||||
listen_socket1.port = 9000
|
listen_socket1.port = 10000
|
||||||
listen_socket1.save!
|
listen_socket1.save!
|
||||||
|
|
||||||
listen_socket2 = IcecastListenSocket.new
|
listen_socket2 = IcecastListenSocket.new
|
||||||
listen_socket2.port = 9001
|
listen_socket2.port = 10001
|
||||||
listen_socket2.save!
|
listen_socket2.save!
|
||||||
|
|
||||||
template = IcecastTemplate.new
|
template = IcecastTemplate.new
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,7 @@ module JamRuby
|
||||||
# we have to have a mount, fan_access has to be true, and we have to allow for the reload of icecast to have taken effect
|
# we have to have a mount, fan_access has to be true, and we have to allow for the reload of icecast to have taken effect
|
||||||
query = query.joins('INNER JOIN icecast_mounts ON icecast_mounts.music_session_id = music_sessions.id INNER JOIN icecast_servers ON icecast_mounts.icecast_server_id = icecast_servers.id')
|
query = query.joins('INNER JOIN icecast_mounts ON icecast_mounts.music_session_id = music_sessions.id INNER JOIN icecast_servers ON icecast_mounts.icecast_server_id = icecast_servers.id')
|
||||||
query = query.where(:fan_access => true)
|
query = query.where(:fan_access => true)
|
||||||
query = query.where("
|
query = query.where("(music_sessions.created_at < icecast_servers.config_updated_at)")
|
||||||
(music_sessions.created_at < icecast_servers.config_updated_at AND NOW() - icecast_servers.config_updated_at > interval '#{APP_CONFIG.icecast_reload_slush} seconds')")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
query = query.where("music_sessions.description like '%#{keyword}%'") unless keyword.nil?
|
query = query.where("music_sessions.description like '%#{keyword}%'") unless keyword.nil?
|
||||||
|
|
|
||||||
|
|
@ -288,16 +288,6 @@ describe MusicSession do
|
||||||
sessions.length.should == 0
|
sessions.length.should == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
it "no session listed if icecast_server config was updated but still before slush time" do
|
|
||||||
connection_with_mount.touch
|
|
||||||
session_with_mount.created_at = 2.minutes.ago
|
|
||||||
session_with_mount.save!(:validate => false)
|
|
||||||
session_with_mount.mount.server.config_updated_at = (APP_CONFIG.icecast_reload_slush - 1).second.ago
|
|
||||||
session_with_mount.mount.server.save!(:validate => false)
|
|
||||||
sessions = MusicSession.index(user, as_musician: false)
|
|
||||||
sessions.length.should == 0
|
|
||||||
end
|
|
||||||
|
|
||||||
it "session listed if icecast_server config has been updated" do
|
it "session listed if icecast_server config has been updated" do
|
||||||
connection_with_mount.touch
|
connection_with_mount.touch
|
||||||
session_with_mount.created_at = 2.minutes.ago
|
session_with_mount.created_at = 2.minutes.ago
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,6 @@ def app_config
|
||||||
15 # 15 seconds
|
15 # 15 seconds
|
||||||
end
|
end
|
||||||
|
|
||||||
def icecast_reload_slush
|
|
||||||
3 # 3 seconds
|
|
||||||
end
|
|
||||||
|
|
||||||
def icecast_hardcoded_source_password
|
def icecast_hardcoded_source_password
|
||||||
nil # generate a new password everytime
|
nil # generate a new password everytime
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -182,7 +182,6 @@ include JamRuby
|
||||||
config.icecast_server_id = ENV['ICECAST_SERVER_ID'] || 'localhost'
|
config.icecast_server_id = ENV['ICECAST_SERVER_ID'] || 'localhost'
|
||||||
config.icecast_max_missing_check = 2 * 60 # 2 minutes
|
config.icecast_max_missing_check = 2 * 60 # 2 minutes
|
||||||
config.icecast_max_sourced_changed = 15 # 15 seconds
|
config.icecast_max_sourced_changed = 15 # 15 seconds
|
||||||
config.icecast_reload_slush = 3 # 3 seconds
|
|
||||||
config.icecast_hardcoded_source_password = nil # generate a new password everytim. production should always use this value
|
config.icecast_hardcoded_source_password = nil # generate a new password everytim. production should always use this value
|
||||||
|
|
||||||
config.email_alerts_alias = 'nobody@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails
|
config.email_alerts_alias = 'nobody@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue