Class: UffizziCore::Deployment::ManageDeployActivityItemJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/uffizzi_core/deployment/manage_deploy_activity_item_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(activity_item_id) ⇒ Object



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'app/jobs/uffizzi_core/deployment/manage_deploy_activity_item_job.rb', line 34

def perform(activity_item_id)
  activity_item = UffizziCore::ActivityItem.find(activity_item_id)
  container = activity_item.container

  if container.disabled?
    logger_message = "DEPLOYMENT_PROCESS deployment_id=#{container.deployment_id} activity_item_id=#{activity_item.id}
    deployment was disabled stop monitoring"
    Rails.logger.info(logger_message)
    return
  end

  UffizziCore::ActivityItemService.manage_deploy_activity_item(activity_item)
end