Sha256: 820a7e807f07323528238dbf9b3babdf0469eae02a1dde992250067ee6108d95

Contents?: true

Size: 447 Bytes

Versions: 6

Compression:

Stored size: 447 Bytes

Contents

module Shipit
  class FetchDeployedRevisionJob < BackgroundJob
    queue_as :default

    def perform(stack)
      return if stack.deploying?

      commands = StackCommands.new(stack)

      begin
        sha = commands.fetch_deployed_revision
      rescue DeploySpec::Error
      end

      return unless sha.present?

      begin
        stack.update_deployed_revision(sha)
      rescue ActiveRecord::RecordNotFound
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
shipit-engine-0.7.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.6.4 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.6.3 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.6.2 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.6.1 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.6.0 app/jobs/shipit/fetch_deployed_revision_job.rb