diff --git a/ruby/lib/jam_ruby/resque/icecast_config_writer.rb b/ruby/lib/jam_ruby/resque/icecast_config_writer.rb index a02761e7b..31fc218a9 100644 --- a/ruby/lib/jam_ruby/resque/icecast_config_writer.rb +++ b/ruby/lib/jam_ruby/resque/icecast_config_writer.rb @@ -70,6 +70,8 @@ module JamRuby cmd = APP_CONFIG.icecast_reload_cmd result = execute(cmd) raise "unable to execute icecast reload cmd=#{cmd}. result=#{$?}" unless result == 0 + + sleep APP_CONFIG.icecast_wait_after_reload end def run diff --git a/ruby/spec/jam_ruby/models/music_session_spec.rb b/ruby/spec/jam_ruby/models/music_session_spec.rb index c521e5ac4..943e4632e 100644 --- a/ruby/spec/jam_ruby/models/music_session_spec.rb +++ b/ruby/spec/jam_ruby/models/music_session_spec.rb @@ -299,7 +299,7 @@ describe MusicSession do end it "session listed if icecast_server config has been updated" do - pending "relative time problem" + pending "relative time problem (fails on seths mac, not linux)" connection_with_mount.touch session_with_mount.created_at = 2.minutes.ago session_with_mount.save!(:validate => false) diff --git a/ruby/spec/support/utilities.rb b/ruby/spec/support/utilities.rb index 7d4a8b60c..980456958 100644 --- a/ruby/spec/support/utilities.rb +++ b/ruby/spec/support/utilities.rb @@ -49,6 +49,10 @@ def app_config nil # generate a new password everytime end + def icecast_wait_after_reload + 0 # 0 seconds + end + def rabbitmq_host "localhost" end diff --git a/web/config/application.rb b/web/config/application.rb index c02168a24..d450e6626 100644 --- a/web/config/application.rb +++ b/web/config/application.rb @@ -184,6 +184,7 @@ include JamRuby 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_wait_after_reload = 5 # 5 seconds. a hack needed until VRFS-1043 config.email_alerts_alias = 'nobody@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails config.email_generic_from = 'nobody@jamkazam.com' diff --git a/web/config/environments/test.rb b/web/config/environments/test.rb index 80c4d60f3..a7983a303 100644 --- a/web/config/environments/test.rb +++ b/web/config/environments/test.rb @@ -57,5 +57,7 @@ SampleApp::Application.configure do config.aws_bucket_public = 'jamkazam-testing' config.aws_access_key_id = 'AKIAJESQY24TOT542UHQ' # credentials for jamkazam-tester user, who has access to this bucket config.aws_secret_access_key = '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' + + config.icecast_wait_after_reload = 0 end