* VRFS-2399 - fixed recording sync track issue

This commit is contained in:
Seth Call 2014-10-27 12:42:30 -05:00
parent 7e2b894548
commit 970401374b
3 changed files with 22 additions and 16 deletions

View File

@ -235,6 +235,8 @@ module JamRuby
keep(user)
end
puts "claimed_recording.save #{claimed_recording.errors.inspect}"
claimed_recording
end

View File

@ -31,7 +31,9 @@ module JamRuby
def self.queue_jobs_needing_retry
Mix.find_each(:conditions => "completed = FALSE AND (should_retry = TRUE OR (started_at IS NOT NULL AND NOW() - started_at > '1 hour'::INTERVAL))", :batch_size => 100) do |mix|
mix.enqueue
mix.enq only some of the tracks for client could be located
ueue
end
end
end

View File

@ -538,26 +538,28 @@
if(inSession() && text == "RebuildAudioIoControl") {
if(sessionPageEnterDeferred) {
// this means we are still waiting for the BACKEND_MIXER_CHANGE that indicates we have user tracks built-out/ready
// we will get at least one BACKEND_MIXER_CHANGE that corresponds to the backend doing a 'audio pause', which won't matter much
// so we need to check that we actaully have userTracks before considering ourselves done
var inputTracks = context.JK.TrackHelpers.getUserTracks(context.jamClient);
if(inputTracks.length > 0) {
logger.debug("obtained tracks at start of session")
sessionPageEnterDeferred.resolve(inputTracks);
sessionPageEnterDeferred = null;
}
return;
}
// the backend will send these events rapid-fire back to back.
// the server can still perform correctly, but it is nicer to wait 100 ms to let them all fall through
if(backendMixerAlertThrottleTimer) {clearTimeout(backendMixerAlertThrottleTimer);}
backendMixerAlertThrottleTimer = setTimeout(function() {
if(sessionPageEnterDeferred) {
// this means we are still waiting for the BACKEND_MIXER_CHANGE that indicates we have user tracks built-out/ready
// we will get at least one BACKEND_MIXER_CHANGE that corresponds to the backend doing a 'audio pause', which won't matter much
// so we need to check that we actaully have userTracks before considering ourselves done
var inputTracks = context.JK.TrackHelpers.getUserTracks(context.jamClient);
if(inputTracks.length > 0) {
logger.debug("obtained tracks at start of session")
sessionPageEnterDeferred.resolve(inputTracks);
sessionPageEnterDeferred = null;
}
return;
}
// this is a local change to our tracks. we need to tell the server about our updated track information
var inputTracks = context.JK.TrackHelpers.getUserTracks(context.jamClient);