Sha256: adb5a8a915ebb7fecb207bf2ce5191d5edf6f718699f7caffba7acaf3974abc3

Contents?: true

Size: 454 Bytes

Versions: 8

Compression:

Stored size: 454 Bytes

Contents

module Shipit
  class CacheDeploySpecJob < BackgroundJob
    include BackgroundJob::Unique
    on_duplicate :drop

    queue_as :deploys

    def perform(stack)
      return if stack.inaccessible?

      commands = Commands.for(stack)
      commands.with_temporary_working_directory(commit: stack.commits.reachable.last) do |path|
        stack.update!(cached_deploy_spec: DeploySpec::FileSystem.new(path, stack.environment))
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
shipit-engine-0.31.0 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.30.0 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.29.0 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.28.1 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.28.0 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.27.1 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.27.0 app/jobs/shipit/cache_deploy_spec_job.rb
shipit-engine-0.26.0 app/jobs/shipit/cache_deploy_spec_job.rb