Module: Pult::Panel::Executor

Defined in:
lib/init/struct.rb,
lib/pult/panel/executor.rb

Defined Under Namespace

Classes: Job

Class Method Summary collapse

Class Method Details

.run!(hash, action, *args) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/pult/panel/executor.rb', line 10

def self.run! hash, action, *args
  command = hash[action]

  runner = Pult::Executor.run! command, hash._config.dir, *args

  runner.class_eval { include Pult::Panel::Runner::DotAccessible }

  Pult::Panel::Runner::Injector.inject! hash, action, runner

  runner
end

.run_job!(hash, action, *args) ⇒ Object



22
23
24
# File 'lib/pult/panel/executor.rb', line 22

def self.run_job! hash, action, *args
  Job.perform_later hash.object_id, action, *args
end