method
start_job
ruby latest stable - Class:
Shell::ProcessController
start_job(command = nil)public
start a job
# File lib/shell/process-controller.rb, line 152
def start_job(command = nil)
@jobs_sync.synchronize(:EX) do
if command
return if command.active?
@waiting_jobs.delete command
else
command = @waiting_jobs.shift
return unless command
end
@active_jobs.push command
command.start
# start all jobs that input from the job
for job in @waiting_jobs.dup
start_job(job) if job.input == command
end
end
end Related methods
- Instance methods
- active_job?
- active_jobs
- active_jobs_exist?
- add_schedule
- jobs
- jobs_exist?
- kill_job
- sfork
- start_job
- terminate_job
- wait_all_jobs_execution
- waiting_job?
- waiting_jobs
- waiting_jobs_exist?
- Class methods
- activate
- active_process_controllers
- block_output_synchronize
- each_active_object
- inactivate
- new
- wait_to_finish_all_process_controllers