diff options
Diffstat (limited to 'app/workers/jira_connect/send_uninstalled_hook_worker.rb')
-rw-r--r-- | app/workers/jira_connect/send_uninstalled_hook_worker.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/workers/jira_connect/send_uninstalled_hook_worker.rb b/app/workers/jira_connect/send_uninstalled_hook_worker.rb new file mode 100644 index 00000000000..530ef4a8b8a --- /dev/null +++ b/app/workers/jira_connect/send_uninstalled_hook_worker.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +module JiraConnect + class SendUninstalledHookWorker + include ApplicationWorker + + data_consistency :delayed + queue_namespace :jira_connect + feature_category :integrations + urgency :low + + idempotent! + + worker_has_external_dependencies! + + def perform(installation_id, instance_url) + installation = JiraConnectInstallation.find_by_id(installation_id) + + JiraConnectInstallations::ProxyLifecycleEventService.execute(installation, :uninstalled, instance_url) + end + end +end |