Sha256: 674b216818ddae5459142e8604eb57abe3e1e5a3eca188b38d347af9ab0b3715

Contents?: true

Size: 487 Bytes

Versions: 13

Compression:

Stored size: 487 Bytes

Contents

module Workarea
  class PublishRelease
    include Sidekiq::Worker
    sidekiq_options queue: 'releases'

    def perform(release_id)
      release = Release.find(release_id)
      system_user = User.find_system_user!(release.name, 'Release')

      Mongoid::AuditLog.record(system_user) { release.publish! }
      IndexReleaseSchedulePreviews.new(release: release).perform

    rescue Mongoid::Errors::DocumentNotFound
      # Doesn't matter, release has been removed
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
workarea-core-3.5.27 app/workers/workarea/publish_release.rb
workarea-core-3.5.26 app/workers/workarea/publish_release.rb
workarea-core-3.5.25 app/workers/workarea/publish_release.rb
workarea-core-3.5.23 app/workers/workarea/publish_release.rb
workarea-core-3.5.22 app/workers/workarea/publish_release.rb
workarea-core-3.5.21 app/workers/workarea/publish_release.rb
workarea-core-3.5.20 app/workers/workarea/publish_release.rb
workarea-core-3.5.19 app/workers/workarea/publish_release.rb
workarea-core-3.5.18 app/workers/workarea/publish_release.rb
workarea-core-3.5.17 app/workers/workarea/publish_release.rb
workarea-core-3.5.16 app/workers/workarea/publish_release.rb
workarea-core-3.5.15 app/workers/workarea/publish_release.rb
workarea-core-3.5.14 app/workers/workarea/publish_release.rb