chore(export/job): set procedure_id for sentry
This commit is contained in:
parent
964f3829c6
commit
a4329b6699
2 changed files with 8 additions and 4 deletions
|
@ -3,6 +3,10 @@ class ExportJob < ApplicationJob
|
|||
|
||||
discard_on ActiveRecord::RecordNotFound
|
||||
|
||||
before_perform do |job|
|
||||
Sentry.set_tags(procedure_id: job.arguments.first.procedure.id)
|
||||
end
|
||||
|
||||
def perform(export)
|
||||
return if export.generated?
|
||||
|
||||
|
|
|
@ -163,6 +163,10 @@ class Export < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def procedure
|
||||
groupe_instructeurs.first.procedure
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def load_snapshot!
|
||||
|
@ -204,8 +208,4 @@ class Export < ApplicationRecord
|
|||
service.to_geo_json
|
||||
end
|
||||
end
|
||||
|
||||
def procedure
|
||||
groupe_instructeurs.first.procedure
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue