add: expire issue send message

This commit is contained in:
2021-09-16 10:10:05 +08:00
parent cb76a946ef
commit b8a52107a5
5 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
class SendTemplateMessageJob < ApplicationJob
queue_as :default
queue_as :message
def perform(source, *args)
Rails.logger.info "SendTemplateMessageJob [args] #{args}"
@@ -94,7 +94,7 @@ class SendTemplateMessageJob < ApplicationJob
project = Project.find_by_id(project_id)
return unless user.present? && project.present?
receivers = User.where(id: user.id)
receivers_string, content, notification_url = MessageTemplate::ProjectJoined.get_message_content(receivers, project)
receivers_string, content, notification_url = MessageTemplate::ProjectLeft.get_message_content(receivers, project)
Notice::Write::CreateService.call(receivers_string, content, notification_url, source, {user_id: user.id, project_id: project.id})
when 'ProjectRole'
user_id, project_id, role = args[0], args[1], args[2]