Template of a custom feed generator service for the Bluesky network in Ruby

added message seq to some firehose logs

Changed files
+3 -3
app
+3 -3
app/firehose_stream.rb
··· 77 # use these events if you want to track handle changes: 78 # puts "Handle change: #{msg.repo} => #{msg.handle}" 79 elsif msg.is_a?(Skyfall::UnknownMessage) 80 - puts "Unknown message type: #{msg.type}" 81 end 82 83 return unless msg.type == :commit ··· 120 return unless op.action == :create 121 122 if op.raw_record.nil? 123 - puts "Error: missing expected record data in operation: #{op.uri}" 124 return 125 end 126 ··· 129 post_time = Time.parse(op.raw_record['createdAt']) 130 return if post_time < msg.time - 86400 131 rescue StandardError => e 132 - puts "Skipping post with invalid timestamp: #{op.raw_record['createdAt'].inspect} (#{op.repo})" 133 return 134 end 135
··· 77 # use these events if you want to track handle changes: 78 # puts "Handle change: #{msg.repo} => #{msg.handle}" 79 elsif msg.is_a?(Skyfall::UnknownMessage) 80 + puts "Unknown message type: #{msg.type} (#{msg.seq})" 81 end 82 83 return unless msg.type == :commit ··· 120 return unless op.action == :create 121 122 if op.raw_record.nil? 123 + puts "Error: missing expected record data in operation: #{op.uri} (#{msg.seq})" 124 return 125 end 126 ··· 129 post_time = Time.parse(op.raw_record['createdAt']) 130 return if post_time < msg.time - 86400 131 rescue StandardError => e 132 + puts "Skipping post with invalid timestamp: #{op.raw_record['createdAt'].inspect} (#{op.repo}, #{msg.seq})" 133 return 134 end 135