Sha256: 960068e604e82d494231ea2e594c36b1aba0d40d408d70f765e6fbdeac197d69

Contents?: true

Size: 479 Bytes

Versions: 11

Compression:

Stored size: 479 Bytes

Contents

module Shipit
  class FetchDeployedRevisionJob < BackgroundJob
    queue_as :default

    def perform(stack)
      return if stack.active_task?
      return if stack.inaccessible?

      commands = StackCommands.new(stack)

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

      return if sha.blank?

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shipit-engine-0.28.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.27.1 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.27.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.26.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.25.1 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.25.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.24.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.23.1 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.23.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.22.0 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.21.0 app/jobs/shipit/fetch_deployed_revision_job.rb