To not stream threads at once (module require issue).

This commit is contained in:
Martin Edenhofer 2016-11-04 00:09:05 +01:00
parent 0c5afe9bd8
commit c5c22a6b68

View file

@ -159,10 +159,13 @@ stream all accounts
updated_at: channel.updated_at
}
# start channels with delay
sleep @@channel_stream.count
# start threads for each channel
@@channel_stream[channel.id][:thread] = Thread.new {
begin
logger.debug "Started stream channel for '#{channel.id}' (#{channel.area})..."
logger.info "Started stream channel for '#{channel.id}' (#{channel.area})..."
@@channel_stream[channel.id][:stream_instance] = channel.stream_instance
@@channel_stream[channel.id][:stream_instance].stream
@@channel_stream[channel.id][:stream_instance].disconnect