From faa4893624da2f9e048197ce41a5e339485e8d01 Mon Sep 17 00:00:00 2001 From: Christopher Vollick <0@psycoti.ca> Date: Mon, 30 Jan 2023 16:57:35 -0500 Subject: [PATCH] Setup Sentry I thought the gem did this automatically if I wanted the default config, but apparently not! So this requires the SENTRY_DSN env-var to be set, and also in practice requires SSL_CERT_DIR=/etc/ssl/certs if you don't have the certs installed in guix as well. Then we set the worker threads to 0 so it sends synchronously, since otherwise we're about to quit and it'll just get enqueued and never flushed. --- bin/process_interac_email | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/process_interac_email b/bin/process_interac_email index 02d087149cdd819554b0862a8ad17d87425c1bba..ecbfb0b80587761b51e1b7195eba5f1d54b73e8e 100755 --- a/bin/process_interac_email +++ b/bin/process_interac_email @@ -35,6 +35,10 @@ CONFIG = .new(safe: Dhall::Coder::JSON_LIKE + [Symbol, Proc]) .load(ARGV.shift, transform_keys: :to_sym) +Sentry.init do |config| + config.background_worker_threads = 0 +end + pubsub = BlatherNotify::PubSub::Address.new(**CONFIG[:pubsub]) m = Mail.new(ARGF.read)