Class: DeployerTask

Inherits:
TorqueBox::Messaging::Task
  • Object
show all
Defined in:
app/tasks/deployer_task.rb

Instance Method Summary collapse

Instance Method Details

#deploy(payload) ⇒ Object



25
26
27
28
29
30
31
# File 'app/tasks/deployer_task.rb', line 25

def deploy(payload)
  push = Push.get(payload[:id])
  if push
    Deployer.undeploy_branch(push.branch)
    Deployer.new(push).deploy
  end
end

#undeploy(payload) ⇒ Object



33
34
35
36
37
38
# File 'app/tasks/deployer_task.rb', line 33

def undeploy(payload)
  push = Push.get(payload[:id])
  if push
    Deployer.new(push).undeploy
  end
end