@@ 2,6 2,7 @@
# frozen_string_literal: true
# Usage: bin/process_pending-btc_transactions '{
+# healthchecks_url = "https://hc-ping.com/...",
# oxr_app_id = "",
# required_confirmations = 3,
# notify_using = {
@@ 30,6 31,8 @@ CONFIG =
.new(safe: Dhall::Coder::JSON_LIKE + [Symbol, Proc])
.load(ARGV[0], transform_keys: :to_sym)
+Net::HTTP.post_form(URI("#{CONFIG[:healthchecks_url]}/start"), {})
+
REDIS = Redis.new
ELECTRUM = Electrum.new(**CONFIG[:electrum])
@@ 241,3 244,5 @@ REDIS.hgetall("pending_btc_transactions").each do |(txid, customer_id)|
end
end
end
+
+Net::HTTP.post_form(URI(CONFIG[:healthchecks_url].to_s), {})