Execute background job anyway.
This commit is contained in:
parent
98db7a1899
commit
2127249903
1 changed files with 3 additions and 3 deletions
|
@ -19,6 +19,9 @@ class Observer::Ticket::Article::EmailSignatureDetection < ActiveRecord::Observe
|
|||
type = Ticket::Article::Type.lookup( id: record.type_id )
|
||||
return if type['name'] != 'email'
|
||||
|
||||
# add queue job to update current signature of user id
|
||||
Delayed::Job.enqueue( Observer::Ticket::Article::SignatureDetection::BackgroundJob.new( record.created_by_id ) )
|
||||
|
||||
# user
|
||||
user = User.lookup(id: record.created_by_id)
|
||||
return if !user
|
||||
|
@ -26,8 +29,5 @@ class Observer::Ticket::Article::EmailSignatureDetection < ActiveRecord::Observe
|
|||
return if !user.preferences[:signature_detection]
|
||||
|
||||
record.preferences[:signature_detection] = SignatureDetection.find_signature_line(user.preferences[:signature_detection], record.body)
|
||||
|
||||
# add queue job to update current signature of user id
|
||||
Delayed::Job.enqueue( Observer::Ticket::Article::SignatureDetection::BackgroundJob.new( record.created_by_id ) )
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue