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

stop firehose asynchronously on ctrl+c

some things like post saving can't be done from the "trap context"

Changed files
+8 -2
bin
+8 -2
bin/firehose
··· 77 77 78 78 trap("SIGINT") { 79 79 firehose.log "Stopping..." 80 - firehose.stop 80 + 81 + EM.add_timer(0) { 82 + firehose.stop 83 + } 81 84 } 82 85 83 86 trap("SIGTERM") { 84 87 firehose.log "Shutting down the service..." 85 - firehose.stop 88 + 89 + EM.add_timer(0) { 90 + firehose.stop 91 + } 86 92 } 87 93 88 94 firehose.start