新增:创建数据延迟5秒触发webhook

This commit is contained in:
yystopf 2023-04-11 14:11:17 +08:00
parent 8663efc73b
commit f64afb8f55
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class JournalsController < ApplicationController
end
Rails.logger.info "[ATME] maybe to at such users: #{@atme_receivers.pluck(:login)}"
AtmeService.call(current_user, @atme_receivers, journal) if @atme_receivers.size > 0
TouchWebhookJob.perform_later('PullRequestComment', @issue&.id, current_user.id, journal.id, 'created', {})
TouchWebhookJob.set(wait: 5.seconds).perform_later('PullRequestComment', @issue&.id, current_user.id, journal.id, 'created', {})
# @issue.project_trends.create(user_id: current_user.id, project_id: @project.id, action_type: "journal")
render :json => { status: 0, message: "评论成功", id: journal.id}
# normal_status(0, "评论成功")