新增:创建数据延迟5秒触发webhook
This commit is contained in:
parent
bea2831149
commit
8663efc73b
|
@ -69,7 +69,7 @@ class Api::V1::Issues::CreateService < ApplicationService
|
|||
end
|
||||
|
||||
# 触发webhook
|
||||
TouchWebhookJob.perform_later('IssueCreate', @created_issue&.id, current_user.id)
|
||||
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueCreate', @created_issue&.id, current_user.id)
|
||||
TouchWebhookJob.perform_later('IssueLabel', @created_issue&.id, current_user.id, issue_tag_ids) unless issue_tag_ids.blank?
|
||||
TouchWebhookJob.perform_later('IssueAssign', @created_issue&.id, current_user.id, assigner_ids) unless assigner_ids.blank?
|
||||
unlock("Api::V1::Issues::CreateService:#{project.id}") # 结束写数据,解锁
|
||||
|
|
|
@ -41,7 +41,7 @@ class Api::V1::Issues::Journals::CreateService < ApplicationService
|
|||
|
||||
# @信息发送
|
||||
AtmeService.call(current_user, @atme_receivers, @created_journal) unless receivers_login.blank?
|
||||
TouchWebhookJob.perform_later('IssueComment', @issue&.id, @current_user.id, @created_journal.id, 'created', {})
|
||||
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueComment', @issue&.id, @current_user.id, @created_journal.id, 'created', {})
|
||||
unlock("Api::V1::Issues::Journals::CreateService:#{@issue.id}")
|
||||
|
||||
@created_journal
|
||||
|
|
Loading…
Reference in New Issue