Class: UffizziCore::Deployment::CreateCredentialsJob

Inherits:
ApplicationJob show all
Defined in:
app/jobs/uffizzi_core/deployment/create_credentials_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(deployment_id) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/jobs/uffizzi_core/deployment/create_credentials_job.rb', line 6

def perform(deployment_id)
  Rails.logger.info("DEPLOYMENT_PROCESS deployment_id=#{deployment_id} CreateCredentialsJob")

  deployment = UffizziCore::Deployment.find(deployment_id)

  credentials = deployment.project..credentials.deployable

  credentials.each do |credential|
    UffizziCore::Deployment::CreateCredentialJob.perform_async(deployment.id, credential.id)
  end
end