user_api/com/mdi/dialog/cloud_gate.rb
# Inject a track in the server queue (ie push a message to the server)
# @param [CloudConnectServices::Track] track the track to send
Inject a track in the server queue
Inject a track in the server queue
def inject_track(track)
          begin
            CC.push(track.to_hash_to_send_to_cloud,'tracks')
            SDK_STATS.stats['agents'][user_api.user_class.agent_name]['inject_to_cloud'] += 1
          rescue Exception => e
            user_api.mdi.tools.log.error("Error on inject track")
            user_api.mdi.tools.print_ruby_exception(e)
            PUNK.end('injecttrack','ko','out',"SERVER <- SERVER MSG")
            SDK_STATS.stats['agents'][user_api.user_class.agent_name]['err_on_inject'] += 1
            SDK_STATS.stats['agents'][user_api.user_class.agent_name]['total_error'] += 1
          end
        end
def inject_track ( track ) begin CC . push ( track . to_hash_to_send_to_cloud , 'tracks' ) SDK_STATS . stats [ 'agents' ] [ user_api . user_class . agent_name ] [ 'inject_to_cloud' ] += 1 rescue Exception => e user_api . mdi . tools . log . error ( "Error on inject track" ) user_api . mdi . tools . print_ruby_exception ( e ) PUNK . end ( 'injecttrack' , 'ko' , 'out' , "SERVER <- SERVER MSG" ) SDK_STATS . stats [ 'agents' ] [ user_api . user_class . agent_name ] [ 'err_on_inject' ] += 1 SDK_STATS . stats [ 'agents' ] [ user_api . user_class . agent_name ] [ 'total_error' ] += 1 end end
Inject a track in the server queue (ie push a message to the server)
Inject a track in the server queue ( ie push a message to the server )
# todo: put some limitation # success ! # stats:
track
<not_specific>
<not_specific>
track the track to send
track the track to send