A platform for community discussion. Free, open, simple.
DEV: decrease webhook timeout and move to 'low' priority queue. (#14038)
Vinoth Kannanc75500b871f9
diff --git a/app/jobs/regular/emit_web_hook_event.rb b/app/jobs/regular/emit_web_hook_event.rbindex 7b22f0398b9..c291037f952 100644--- a/app/jobs/regular/emit_web_hook_event.rb+++ b/app/jobs/regular/emit_web_hook_event.rb@@ -4,9 +4,12 @@ require 'excon'module Jobsclass EmitWebHookEvent < ::Jobs::Base+ sidekiq_options queue: 'low'+PING_EVENT = 'ping'MAX_RETRY_COUNT = 4RETRY_BACKOFF = 5+ REQUEST_TIMEOUT = 20def execute(args)@arguments = args@@ -41,7 +44,14 @@ module Jobsdef send_webhook!uri = URI(@web_hook.payload_url.strip)- conn = Excon.new(uri.to_s, ssl_verify_peer: @web_hook.verify_certificate, retry_limit: 0)+ conn = Excon.new(+ uri.to_s,+ ssl_verify_peer: @web_hook.verify_certificate,+ retry_limit: 0,+ write_timeout: REQUEST_TIMEOUT,+ read_timeout: REQUEST_TIMEOUT,+ connect_timeout: REQUEST_TIMEOUT+ )web_hook_body = build_webhook_bodyweb_hook_event = create_webhook_event(web_hook_body)