Sha256: 7486495c350c0a90492a03840ba63365a247fccaef8f9f38294ac46a1d6ca365

Contents?: true

Size: 449 Bytes

Versions: 10

Compression:

Stored size: 449 Bytes

Contents

module Shipit
  class FetchDeployedRevisionJob < BackgroundJob
    queue_as :default

    def perform(stack)
      return if stack.active_task?

      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

10 entries across 10 versions & 1 rubygems

Version Path
shipit-engine-0.8.9 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.8 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.7 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.6 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.5 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.4 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.3 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.2 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.1 app/jobs/shipit/fetch_deployed_revision_job.rb
shipit-engine-0.8.0 app/jobs/shipit/fetch_deployed_revision_job.rb