Skip to content

Commit

Permalink
update submission_processed notification to add invalidate_cache para…
Browse files Browse the repository at this point in the history
…m (#117)
  • Loading branch information
syphax-bouazzouni authored Dec 20, 2023
1 parent 2878f43 commit e98b884
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY Gemfile* /srv/ontoportal/ontologies_linked_data/

WORKDIR /srv/ontoportal/ontologies_linked_data

RUN gem update --system
RUN gem update --system 3.4.22 # the 3.4.22 can be removed if we support Ruby version > 3.0
RUN gem install bundler
ENV BUNDLE_PATH=/srv/ontoportal/bundle
RUN bundle install
Expand Down
4 changes: 2 additions & 2 deletions lib/ontologies_linked_data/utils/notifications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ def self.submission_processed(submission)
ontology.bring(:name, :acronym)
result = submission.ready? || submission.archived? ? 'Success' : 'Failure'
status = LinkedData::Models::SubmissionStatus.readable_statuses(submission.submissionStatus)

ontology_location = "#{LinkedData::Hypermedia.generate_links(ontology)['ui']}?invalidate_cache=true"
subject = "[#{LinkedData.settings.ui_name}] #{ontology.name} Parsing #{result}"
body = SUBMISSION_PROCESSED.gsub('%ontology_name%', ontology.name)
.gsub('%ontology_acronym%', ontology.acronym)
.gsub('%statuses%', status.join('<br/>'))
.gsub('%admin_email%', LinkedData.settings.email_sender)
.gsub('%ontology_location%', LinkedData::Hypermedia.generate_links(ontology)['ui'])
.gsub('%ontology_location%', ontology_location)
.gsub('%ui_name%', LinkedData.settings.ui_name)

Notifier.notify_subscribed_separately subject, body, ontology, 'PROCESSING'
Expand Down

0 comments on commit e98b884

Please sign in to comment.