diff --git a/bin/process_pending_btc_transactions b/bin/process_pending_btc_transactions index 1fc8cbe4a5d3cb32ac0673be7dc96bda61430ee2..964e0c5bda0ea32decbcff40f21bde8d467eaa82 100755 --- a/bin/process_pending_btc_transactions +++ b/bin/process_pending_btc_transactions @@ -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), {})