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

enable websocket "heartbeat" check in skyfall

Changed files
+6
app
+6
app/firehose_stream.rb
··· 33 33 34 34 @sky = sky = Skyfall::Firehose.new(@service, :subscribe_repos, cursor) 35 35 36 + @sky.check_heartbeat = true 37 + 36 38 @sky.on_message do |m| 37 39 process_message(m) 38 40 end 39 41 40 42 if @log_status 41 43 @sky.on_connecting { |u| log "Connecting to #{u}..." } 44 + 42 45 @sky.on_connect { 43 46 @replaying = !!(cursor) 44 47 log "Connected ✓" 45 48 } 49 + 46 50 @sky.on_disconnect { 47 51 log "Disconnected." 48 52 save_cursor(sky.cursor) 49 53 } 54 + 55 + @sky.on_timeout { log "Trying to reconnect..." } 50 56 @sky.on_reconnect { log "Connection lost, reconnecting..." } 51 57 @sky.on_error { |e| log "ERROR: #{e.class} #{e.message}" } 52 58 end